Sha256: dc0b1f39a1fe1781921ff5e74ce225a83744c585555c9a2dfd9f8545c4e111b7
Contents?: true
Size: 351 Bytes
Versions: 1
Compression:
Stored size: 351 Bytes
Contents
# frozen_string_literal: true class Quickdraw::Pipe def initialize @reader, @writer = IO.pipe end def reader @writer.close @reader end def writer @reader.close @writer end def with_writer @reader.close yield(@writer).tap { @writer.close } end def with_reader @writer.close yield(@reader).tap { @reader.close } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
quickdraw-0.1.0 | lib/quickdraw/pipe.rb |