in lib/anthropic/internal/type/io_like.rb [28:71]
def self.==(other) = other.is_a?(Class) && other <= Anthropic::Internal::Type::IOLike
class << self
def coerce(value, state:)
exactness = state.fetch(:exactness)
case value
in String
exactness[:yes] += 1
StringIO.new(value)
in StringIO
exactness[:yes] += 1
value
else
exactness[:no] += 1
value
end
end
end