class Turbopuffer::Internal::Util::ReadIOAdapter

def initialize(src, &blk)

Other tags:
    Yieldparam: -

Parameters:
  • blk (Proc) --
  • src (String, Pathname, StringIO, Enumerable) --

Other tags:
    Api: - private
def initialize(src, &blk)
  @stream =
    case src
    in String
      StringIO.new(src)
    in Pathname
      @closing = true
      src.open(binmode: true)
    else
      src
    end
  @buf = String.new
  @blk = blk
end