Module: SalesClicExporter::Document

Defined in:
lib/sales_clic_exporter/base.rb,
lib/sales_clic_exporter/excel.rb,
lib/sales_clic_exporter/google_spreadsheets.rb

Overview

Document describes a format to which data can be exported. A document can contain titles, lines or arrays.

Defined Under Namespace

Classes: Base, Excel, GoogleSpreadsheets

Class Method Summary collapse

Class Method Details

.allowed_extensionsObject

Gives the format that are supported by this plug-in. It can be used in routes to check if the requested format can be generated.

Examples:

SalesClicExporter::Document.allowed_extensions #=> ['xls', 'google_spreadsheet']


10
11
12
13
14
15
# File 'lib/sales_clic_exporter/base.rb', line 10

def self.allowed_extensions
  subclasses = self::Base.subclasses
  subclasses.map do |klass|
    klass.const_defined?(:Extension)   ?   klass::Extension   :   nil
  end.compact
end