Class: Hx::Interop::Pipe

Inherits:
Object
  • Object
show all
Includes:
ReaderWriter
Defined in:
lib/interop/pipe.rb

Overview

A message pipe. You can read exactly what is written to it.

Instance Method Summary collapse

Methods included from Reader

new, #read, #read_all

Methods included from Writer

#<<, new, #write

Constructor Details

#initialize(buffer_size = 0) ⇒ Pipe

Returns a new instance of Pipe.



11
12
13
# File 'lib/interop/pipe.rb', line 11

def initialize(buffer_size = 0)
  @channel = Channel.new(buffer_size)
end

Instance Method Details

#closeObject



15
16
17
# File 'lib/interop/pipe.rb', line 15

def close
  @channel.close
end