Class: Tramway::Export::ApplicationDecorator

Inherits:
Object
  • Object
show all
Extended by:
Delegating::ClassHelper
Defined in:
app/decorators/tramway/export/application_decorator.rb

Direct Known Subclasses

Xls::ApplicationDecorator

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ ApplicationDecorator

Returns a new instance of ApplicationDecorator.



4
5
6
# File 'app/decorators/tramway/export/application_decorator.rb', line 4

def initialize(object)
  @object = object
end

Class Method Details

.columnsObject



11
12
13
# File 'app/decorators/tramway/export/application_decorator.rb', line 11

def columns
  []
end

.decorate(array) ⇒ Object



19
20
21
22
23
# File 'app/decorators/tramway/export/application_decorator.rb', line 19

def decorate(array)
  array.map do |obj|
    new obj
  end
end

.filenameObject



15
16
17
# File 'app/decorators/tramway/export/application_decorator.rb', line 15

def filename
  'export.xlsx'
end