self.==

in lib/openai/internal/type/io_like.rb [30:73]


        def self.==(other) = other.is_a?(Class) && other <= OpenAI::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