lib/csv2hash/parser/collection.rb in csv2hash-0.4.0 vs lib/csv2hash/parser/collection.rb in csv2hash-0.5.0
- old
+ new
@@ -4,10 +4,10 @@
def fill!
self.data = {}.tap do |data_computed|
data_computed[:data] ||= []
self.data_source.each_with_index do |line, y|
next if y < definition.header_size
- next if self.ignore_blank_line and line.compact.empty?
+ next if self.options.fetch(:ignore_blank_line) and line.compact.empty?
data_computed[:data] << {}.tap do |data_parsed|
fill_it data_parsed, line
end
end
end