Module: Xporter::Exporter::Generator
- Extended by:
- ActiveSupport::Concern
- Included in:
- Xporter::Exporter
- Defined in:
- lib/xporter/exporter/generator.rb
Instance Method Summary collapse
Instance Method Details
#generate(collection) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/xporter/exporter/generator.rb', line 12 def generate(collection) @collection = collection CSV.generate do |csv| csv << headers content.each do |row| csv << row end end end |