Sha256: 07010ce7a9e09641dd500975b4b7de1abd0c52cfb6fc4041378c98fed1f1717b
Contents?: true
Size: 243 Bytes
Versions: 5
Compression:
Stored size: 243 Bytes
Contents
require 'csv' class Array def merge_numbers!(key=:number) self.each_with_index do |r, i| r.send "#{key}=", i+1 end end def generate_csv CSV.generate do |csv| each { |hash| csv << hash.values } end end end
Version data entries
5 entries across 5 versions & 2 rubygems