module CsvCreator

Constants

VERSION

Public Class Methods

create(collection, options = {}) click to toggle source
# File lib/csv_creator.rb, line 6
def self.create(collection, options = {})
  options_with_defaults = options.reverse_merge({
      csv: { force_quotes: true, headers: true },
      only: nil,
      without: nil,
      order: [],
      order_direction: :asc,
      translate: {},
      callbacks: {}
    })

  Creator.new(collection, options_with_defaults).generate_csv(options_with_defaults)
end
generate(collection, options = {}) click to toggle source

Alias

# File lib/csv_creator.rb, line 21
def self.generate(collection, options = {})
  create(collection, options)
end