Class: Tally::RecordPresenter

Inherits:
Object
  • Object
show all
Defined in:
app/presenters/tally/record_presenter.rb

Instance Method Summary collapse

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_hashObject



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