Module: KyotoTycoon::Stream

Defined in:
lib/kyototycoon/stream.rb

Defined Under Namespace

Classes: Line

Class Method Summary collapse

Class Method Details

.run(io = $stdin, &block) ⇒ Object



17
18
19
20
21
22
# File 'lib/kyototycoon/stream.rb', line 17

def self.run(io=$stdin, &block)
  io.each_line{|line|
    line = Line.new(*line.strip.split("\t", 5))
    block.call(line)
  }
end