Module: Hakoy::FileIterator::Csv
Instance Method Summary collapse
Instance Method Details
#call(file, &block) ⇒ Object
6 7 8 9 10 |
# File 'lib/hakoy/file_iterator/csv.rb', line 6 def call(file, &block) CSV.foreach(file, headers: true) do |row| block.call(row.to_hash) end end |