Class: ActiveReporter::Calculator::Base

Inherits:
Aggregator::Base show all
Defined in:
lib/active_reporter/calculator/base.rb

Direct Known Subclasses

Ratio

Instance Attribute Summary

Attributes inherited from Aggregator::Base

#name, #opts, #report

Instance Method Summary collapse

Methods inherited from Aggregator::Base

#aggregate, #default_value, #initialize, #sql_value_name

Constructor Details

This class inherits a constructor from ActiveReporter::Aggregator::Base

Instance Method Details

#aggregatorObject



6
7
8
# File 'lib/active_reporter/calculator/base.rb', line 6

def aggregator
  opts[:aggregator] || name
end

#parent_aggregatorObject



10
11
12
# File 'lib/active_reporter/calculator/base.rb', line 10

def parent_aggregator
  opts[:parent_aggregator] || aggregator
end

#totals?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/active_reporter/calculator/base.rb', line 14

def totals?
  !!opts[:totals]
end