Class: ArtirixDataModels::MetricAggregation

Inherits:
CommonAggregation show all
Defined in:
lib/artirix_data_models/aggregation.rb

Constant Summary

Constants included from WithDAORegistry

WithDAORegistry::DEFAULT_DAO_REGISTRY_LOADER

Constants included from Inspectable

Inspectable::SPACE

Instance Attribute Summary collapse

Attributes inherited from CommonAggregation

#name

Attributes included from WithDAORegistry

#dao_registry_loader

Instance Method Summary collapse

Methods inherited from CommonAggregation

from_json, #pretty_name

Methods included from WithDAORegistry

#dao_registry, #dao_registry=, #default_dao_registry, loader_or_registry_or_default, #set_dao_registry, #set_dao_registry_and_loader, #set_dao_registry_loader, #set_default_dao_registry_loader

Methods included from Inspectable

#data_hash_for_inspect, #inspect, #inspect_with_tab

Constructor Details

#initialize(name, value) ⇒ MetricAggregation

Returns a new instance of MetricAggregation.



151
152
153
154
# File 'lib/artirix_data_models/aggregation.rb', line 151

def initialize(name, value)
  super name
  @value = value
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



149
150
151
# File 'lib/artirix_data_models/aggregation.rb', line 149

def value
  @value
end

Instance Method Details

#calculate_filtered(_filtered_values = []) ⇒ Object



163
164
165
166
# File 'lib/artirix_data_models/aggregation.rb', line 163

def calculate_filtered(_filtered_values = [])
  # NOOP
  self
end

#data_hashObject



156
157
158
159
160
161
# File 'lib/artirix_data_models/aggregation.rb', line 156

def data_hash
  {
    name:  name,
    value: value
  }
end