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, #options, #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



8
9
10
# File 'lib/active_reporter/calculator/base.rb', line 8

def aggregator
  options[:aggregator] || name
end

#parent_aggregatorObject



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

def parent_aggregator
  options[:parent_aggregator] || aggregator
end

#totals?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/active_reporter/calculator/base.rb', line 16

def totals?
  !!options[:totals]
end