Class: Okura::Parser::Word

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/okura/parser.rb

Instance Method Summary collapse

Methods included from Base

#each, #initialize

Instance Method Details

#parse(line) ⇒ Object



44
45
46
47
48
# File 'lib/okura/parser.rb', line 44

def parse line
  ti,ts=:to_i,:to_s
  cols=line.split /,/
  cols[0..3].zip([ts,ti,ti,ti]).map{|v,f|f.to_proc.call v}
end