Class: ArtirixDataModels::MetricAggregation

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

Constant Summary

Constants included from Inspectable

Inspectable::SPACE

Instance Attribute Summary collapse

Attributes inherited from CommonAggregation

#name

Instance Method Summary collapse

Methods inherited from CommonAggregation

from_json, #pretty_name

Methods included from Inspectable

#data_hash_for_inspect, #inspect, #inspect_with_tab

Constructor Details

#initialize(name, value) ⇒ MetricAggregation

Returns a new instance of MetricAggregation.



146
147
148
149
# File 'lib/artirix_data_models/aggregation.rb', line 146

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

Instance Attribute Details

#valueObject

Returns the value of attribute value.



144
145
146
# File 'lib/artirix_data_models/aggregation.rb', line 144

def value
  @value
end

Instance Method Details

#calculate_filtered(_filtered_values = []) ⇒ Object



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

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

#data_hashObject



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

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