Class: ArtirixDataModels::CommonAggregation

Inherits:
Object
  • Object
show all
Includes:
Inspectable
Defined in:
lib/artirix_data_models/aggregation.rb

Direct Known Subclasses

Aggregation, MetricAggregation

Constant Summary

Constants included from Inspectable

Inspectable::SPACE

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Inspectable

#data_hash_for_inspect, #inspect, #inspect_with_tab

Constructor Details

#initialize(name) ⇒ CommonAggregation

Returns a new instance of CommonAggregation.



6
7
8
# File 'lib/artirix_data_models/aggregation.rb', line 6

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/artirix_data_models/aggregation.rb', line 4

def name
  @name
end

Class Method Details

.from_json(definition, value_class = Aggregation::Value) ⇒ Object



10
11
12
# File 'lib/artirix_data_models/aggregation.rb', line 10

def self.from_json(definition, value_class = Aggregation::Value)
  DAORegistry.aggregations_factory.aggregation_from_json(definition, value_class: value_class, aggregation_class: self)
end

Instance Method Details

#pretty_nameObject



14
15
16
# File 'lib/artirix_data_models/aggregation.rb', line 14

def pretty_name
  @pretty_name ||= load_pretty_name
end