Class: Cubicle::CalculatedMeasure

Inherits:
Measure show all
Defined in:
lib/cubicle/calculated_measure.rb

Direct Known Subclasses

Difference, Ratio

Instance Attribute Summary

Attributes inherited from Measure

#aggregation_method

Attributes inherited from Member

#alias_list, #condition, #expression, #expression_type, #field_name, #name, #options

Instance Method Summary collapse

Methods inherited from Measure

#aggregate, #default_aggregation_method, #distinct_count?, #expression, #finalize_aggregation

Methods inherited from Member

#included_in?, #matches, #to_js_value

Constructor Details

#initialize(*args) ⇒ CalculatedMeasure

Returns a new instance of CalculatedMeasure.



4
5
6
7
8
9
# File 'lib/cubicle/calculated_measure.rb', line 4

def initialize(*args)
  opts = args.extract_options!
  opts[:aggregation_method] = :calculation
  args << opts
  super(*args)
end

Instance Method Details

#depends_onObject



17
18
19
# File 'lib/cubicle/calculated_measure.rb', line 17

def depends_on
  []
end

#to_js_keysObject

calculated members to not participate in the map/reduce cycle. They are a finalization-time only concept.



13
14
15
# File 'lib/cubicle/calculated_measure.rb', line 13

def to_js_keys
  []
end