Class: LogStash::Inputs::Stdin::InputHandler

Inherits:
EventMachine::Connection
  • Object
show all
Defined in:
lib/logstash/inputs/stdin.rb

Overview

def receive

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ InputHandler

Returns a new instance of InputHandler.



26
27
28
# File 'lib/logstash/inputs/stdin.rb', line 26

def initialize(obj)
  @receiver = obj
end

Instance Method Details

#receive_data(data) ⇒ Object

def initialize



30
31
32
33
34
35
# File 'lib/logstash/inputs/stdin.rb', line 30

def receive_data(data)
  @buffer ||= BufferedTokenizer.new
  @buffer.extract(data).each do |line|
    @receiver.receive(line)
  end
end