lib/csv2hash/parser.rb in csv2hash-0.0.1 vs lib/csv2hash/parser.rb in csv2hash-0.0.2

- old
+ new

@@ -1,24 +1,2 @@ module Parser - - def fill! - @data = {}.tap do |data_computed| - data_computed[:data] ||= [] - data_computed[:data] << {}.tap do |data_parsed| - - definition.rules.each do |rule| - if rule.fetch :mappable - x, y = rule.fetch :position - if (nested = rule.fetch :nested) - data_parsed[nested] ||= {} - data_parsed[nested][rule.fetch(:key)] = data_source[x][y] - else - data_parsed[rule.fetch(:key)] = data_source[x][y] - end - end - end - - end - end - end - end \ No newline at end of file