Module: Differential::Calculator::HasTotals

Extended by:
Forwardable
Included in:
Group, Item, Report
Defined in:
lib/differential/calculator/has_totals.rb

Overview

There are multiple classes that all need calculation support (The Total class.) Instead of using inheritance, those classes can use this mix-in for composition.

Instance Method Summary collapse

Instance Method Details

#totalsObject



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

def totals
  @totals ||= ::Differential::Calculator::Totals.new
end