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 {|Xify::Event.new @author, out| ... } ⇒ Object

Yields:



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

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