Class: Presenter::Export::Statistics
- Inherits:
-
Object
- Object
- Presenter::Export::Statistics
- Defined in:
- lib/presenter/export/statistics.rb
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(wrapper) ⇒ Statistics
constructor
A new instance of Statistics.
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
#build ⇒ Object
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 |