Class: Proforma::Modeling::DataTable::Aggregator

Inherits:
Object
  • Object
show all
Includes:
Function
Defined in:
lib/proforma/modeling/data_table/aggregator.rb

Overview

An Aggregator is a table aggregator function configuration.

Defined Under Namespace

Modules: Function

Constant Summary

Constants included from Function

Function::AVE, Function::SUM

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(function: SUM, name: '', property: nil) ⇒ Aggregator

Returns a new instance of Aggregator.



27
28
29
30
31
# File 'lib/proforma/modeling/data_table/aggregator.rb', line 27

def initialize(function: SUM, name: '', property: nil)
  @function = function
  @name     = name
  @property = property
end

Instance Attribute Details

#functionObject



33
34
35
# File 'lib/proforma/modeling/data_table/aggregator.rb', line 33

def function
  @function || SUM
end

#nameObject



37
38
39
# File 'lib/proforma/modeling/data_table/aggregator.rb', line 37

def name
  @name.to_s
end

#propertyObject

Returns the value of attribute property.



23
24
25
# File 'lib/proforma/modeling/data_table/aggregator.rb', line 23

def property
  @property
end