Class: Presenter::Export::Statistics

Inherits:
Object
  • Object
show all
Defined in:
lib/presenter/export/statistics.rb

Instance Method Summary collapse

Constructor Details

#initialize(wrapper) ⇒ Statistics

Returns a new instance of Statistics.



3
4
5
6
# File 'lib/presenter/export/statistics.rb', line 3

def initialize(wrapper)
  @wrapper = wrapper
  @view_model = wrapper.view_model
end

Instance Method Details

#buildObject



8
9
10
11
12
13
14
15
16
# File 'lib/presenter/export/statistics.rb', line 8

def build
  {
    transaction_type: @view_model.transaction_type,
  }
rescue NoMethodError
  {
    transaction_type: 0,
  }
end