Class: EventMachine::POpen3::Handler

Inherits:
EM::Connection
  • Object
show all
Defined in:
lib/em-popen3/popen3.rb

Direct Known Subclasses

OutHandler

Instance Method Summary collapse

Constructor Details

#initialize(parent, name) ⇒ Handler

Returns a new instance of Handler.



74
75
76
77
78
79
# File 'lib/em-popen3/popen3.rb', line 74

def initialize(parent, name)
  @parent = parent
  @name   = name

  @parent.pipes[@name] = self
end

Instance Method Details

#unbindObject



81
82
83
84
85
86
87
88
# File 'lib/em-popen3/popen3.rb', line 81

def unbind
  begin 
    @io.close unless @io.closed?
  rescue Exception => e
    #don't care if the stream has been closed already
  end
  @parent.unbind(@name)
end