Class: Tally::RecordPresenter
- Inherits:
-
Object
- Object
- Tally::RecordPresenter
- Defined in:
- app/presenters/tally/record_presenter.rb
Instance Method Summary collapse
-
#initialize(record) ⇒ RecordPresenter
constructor
A new instance of RecordPresenter.
- #to_hash ⇒ Object
Constructor Details
#initialize(record) ⇒ RecordPresenter
Returns a new instance of RecordPresenter.
4 5 6 |
# File 'app/presenters/tally/record_presenter.rb', line 4 def initialize(record) @record = record end |
Instance Method Details
#to_hash ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/presenters/tally/record_presenter.rb', line 8 def to_hash { date: @record.day, key: @record.key, value: @record.value, scope: scope } end |