lib/csv2hash/csv_array.rb in csv2hash-0.6.4 vs lib/csv2hash/csv_array.rb in csv2hash-0.6.5

- old
+ new

@@ -1,12 +1,14 @@ require 'csv' -class CsvArray < Array - def to_csv options = {} - CSV.generate(options) do |csv| - self.each do |element| - csv << [element[:value], element[:message]] +module Csv2hash + class CsvArray < Array + + def to_csv options = {} + CSV.generate(options) do |csv| + self.each do |element| + csv << [element[:value], element[:message]] + end end end end - end