Module: EventMachine::SystemCommand::PipeHandler

Defined in:
lib/em-systemcommand/pipe_handler.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
# File 'lib/em-systemcommand/pipe_handler.rb', line 4

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#attach_pipe_handler(name, io_object) ⇒ Object



8
9
10
# File 'lib/em-systemcommand/pipe_handler.rb', line 8

def attach_pipe_handler name, io_object
  EM.attach(io_object, pipe_handler_class(name), self, name)
end

#pipe_handler_class(name) ⇒ Object



12
13
14
# File 'lib/em-systemcommand/pipe_handler.rb', line 12

def pipe_handler_class name
  self.class.pipe_handlers[name]
end