require 'alf' class MarReader < Alf::Reader def each keys = nil each_input_line do |line| decoded = eval(line) if keys.nil? keys = decoded else yield Hash[keys.zip(decoded)] end end end Alf::Reader.register(:mar, [".mar"], self) end