Module: Exportable::ExportMethods

Includes:
CsvExporter, XlsExporter
Defined in:
lib/exportable/export_methods.rb,
lib/exportable/export_methods/csv_exporter.rb,
lib/exportable/export_methods/xls_exporter.rb

Overview

This module serves as a container for export modules

Defined Under Namespace

Modules: CsvExporter, XlsExporter

Instance Method Summary collapse

Methods included from XlsExporter

#export_xls

Methods included from Utils

#get_export_options

Methods included from CsvExporter

#export_csv

Instance Method Details

#export(format, options = {}) ⇒ Object



7
8
9
10
11
12
# File 'lib/exportable/export_methods.rb', line 7

def export(format, options = {})
  unless Exportable.formats.include?(format.to_sym)
    raise ArgumentError, "Unsupported output format '#{format}'"
  end
  send("export_#{format}", options)
end