lib/csv2hash/parser/mapping.rb in csv2hash-0.7.2 vs lib/csv2hash/parser/mapping.rb in csv2hash-0.7.3
- old
+ new
@@ -16,12 +16,12 @@
definition.cells.each do |cell|
if cell.rules.fetch :mappable
y, x = cell.rules.fetch :position
if (nested = cell.rules.fetch :nested)
parsed_data[nested] ||= {}
- parsed_data[nested][cell.rules.fetch(:key)] = source_data[y][x]
+ parsed_data[nested][cell.rules.fetch(:key)] = treat(source_data[y][x])
else
- parsed_data[cell.rules.fetch(:key)] = source_data[y][x]
+ parsed_data[cell.rules.fetch(:key)] = treat(source_data[y][x])
end
end
end
end