in lib/anthropic/internal/type/array_of.rb [55:76]
def coerce(value, state:)
exactness = state.fetch(:exactness)
unless value.is_a?(Array)
exactness[:no] += 1
return value
end
target = item_type
exactness[:yes] += 1
value
.map do |item|
case [nilable?, item]
in [true, nil]
exactness[:yes] += 1
nil
else
Anthropic::Internal::Type::Converter.coerce(target, item, state: state)
end
end
end