class MemoryIO::IO

def to_proc(as, rw)

Other tags:
    Api: - private
def to_proc(as, rw)
  ret = as.respond_to?(rw) ? as.method(rw) : as
  ret = ret.respond_to?(:call) ? ret : MemoryIO::Types.get_proc(ret, rw)
  raise ArgumentError, <<-EOERR.strip unless ret.respond_to?(:call)
lid argument `as`: #{as.inspect}. It should be either a Proc or a supported type of MemoryIO::Types.
  EOERR
  ret
end