Module: Tally::Calculator

Extended by:
ActiveSupport::Concern
Defined in:
lib/tally/calculator.rb

Instance Method Summary collapse

Instance Method Details

#callObject

Override in sub class, this is what gets called when the calculator is run. This method is run in the background so it can take a while if needed to summarize data.

Raises:

  • (NotImplementedError)


19
20
21
# File 'lib/tally/calculator.rb', line 19

def call
  raise NotImplementedError
end

#initialize(day = Date.today) ⇒ Object



12
13
14
# File 'lib/tally/calculator.rb', line 12

def initialize(day = Date.today)
  @day = day
end