Class: MR::PipeTransport

Inherits:
Object
  • Object
show all
Defined in:
lib/pmux/mros.rb

Defined Under Namespace

Classes: PipeIn, PipeOut

Instance Method Summary collapse

Constructor Details

#initialize(ruby_in, ruby_out, ruby_err) ⇒ PipeTransport

Returns a new instance of PipeTransport.



154
155
156
157
158
# File 'lib/pmux/mros.rb', line 154

def initialize ruby_in, ruby_out, ruby_err
  @ruby_in = ruby_in
  @ruby_out = ruby_out
  @ruby_err = ruby_err
end

Instance Method Details

#closeObject



169
170
# File 'lib/pmux/mros.rb', line 169

def close
end

#listen(server) ⇒ Object



160
161
162
163
164
165
166
167
# File 'lib/pmux/mros.rb', line 160

def listen server
  pout = PipeOut.new @ruby_out
  pin = PipeIn.new @ruby_in, server, pout
  perr = PipeOut.new @ruby_err
  server.loop.attach pout
  server.loop.attach pin
  server.loop.attach perr
end