Class: Csv2hash::CsvArray

Inherits:
Array
  • Object
show all
Defined in:
lib/csv2hash/csv_array.rb

Instance Method Summary collapse

Instance Method Details

#to_csv(options = {}) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/csv2hash/csv_array.rb', line 6

def to_csv options = {}
  CSV.generate(options) do |csv|
    self.each do |element|
      csv << [element[:value], element[:message]]
    end
  end
end