class Athena::Formats::Sisis
Constants
- RECORD_RE
Public Instance Methods
parse(input, &block)
click to toggle source
# File lib/athena/formats/sisis.rb 39 def parse(input, &block) 40 record, num = nil, 0 41 42 input.each { |line| 43 element, value = line.match(RECORD_RE)[1, 2] 44 45 if element == record_element 46 record.close if record 47 record = Athena::Record.new(value, block) 48 num += 1 49 else 50 record.update(element, value, config[element]) 51 end 52 } 53 54 record.close if record 55 56 num 57 end