Class: EM::LineProcessor
- Inherits:
-
P::LineAndTextProtocol
- Object
- P::LineAndTextProtocol
- EM::LineProcessor
- Defined in:
- lib/eventmachine/line_processor.rb
Instance Attribute Summary collapse
-
#on_line ⇒ Object
Returns the value of attribute on_line.
Instance Method Summary collapse
Instance Attribute Details
#on_line ⇒ Object
Returns the value of attribute on_line.
3 4 5 |
# File 'lib/eventmachine/line_processor.rb', line 3 def on_line @on_line end |
Instance Method Details
#receive_line(line) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/eventmachine/line_processor.rb', line 5 def receive_line(line) if on_line EM.next_tick do on_line.call line end end end |