Class: Input::Pipe

Inherits:
Object
  • Object
show all
Defined in:
lib/xify/input/pipe.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Pipe

Returns a new instance of Pipe.



3
4
5
# File 'lib/xify/input/pipe.rb', line 3

def initialize(config)
  @author = config['author']
end

Instance Method Details

#updates {|Event.new @author, out| ... } ⇒ Object

Yields:

  • (Event.new @author, out)


7
8
9
10
# File 'lib/xify/input/pipe.rb', line 7

def updates
  out = ARGF.read.chomp
  yield Event.new @author, out if out && out.length != 0
end