Class: EM::LineProcessor

Inherits:
P::LineAndTextProtocol
  • Object
show all
Defined in:
lib/eventmachine/line_processor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#on_lineObject

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