Class: Stackify::Metrics::LatestAggregate
- Defined in:
- lib/stackify/metrics/metric_aggregate.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#count ⇒ Object
Returns the value of attribute count.
-
#metric_id ⇒ Object
Returns the value of attribute metric_id.
-
#metric_type ⇒ Object
Returns the value of attribute metric_type.
-
#name ⇒ Object
Returns the value of attribute name.
-
#occurred_utc ⇒ Object
Returns the value of attribute occurred_utc.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(aggr_metric) ⇒ LatestAggregate
constructor
A new instance of LatestAggregate.
- #to_h ⇒ Object
Constructor Details
#initialize(aggr_metric) ⇒ LatestAggregate
Returns a new instance of LatestAggregate.
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 30 def initialize aggr_metric @count = aggr_metric.count @metric_type = aggr_metric.metric_type @metric_id = aggr_metric.monitor_id @name = aggr_metric.name @occurred_utc = aggr_metric.occurred_utc @value = aggr_metric.value @count = aggr_metric.count @category = aggr_metric.category end |
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category.
27 28 29 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 27 def category @category end |
#count ⇒ Object
Returns the value of attribute count.
27 28 29 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 27 def count @count end |
#metric_id ⇒ Object
Returns the value of attribute metric_id.
27 28 29 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 27 def metric_id @metric_id end |
#metric_type ⇒ Object
Returns the value of attribute metric_type.
27 28 29 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 27 def metric_type @metric_type end |
#name ⇒ Object
Returns the value of attribute name.
27 28 29 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 27 def name @name end |
#occurred_utc ⇒ Object
Returns the value of attribute occurred_utc.
27 28 29 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 27 def occurred_utc @occurred_utc end |
#value ⇒ Object
Returns the value of attribute value.
27 28 29 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 27 def value @value end |
Instance Method Details
#to_h ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 41 def to_h { 'MetricType' => @metric_type, 'MetricID' => @metric_id, 'Name' => @name, 'OccurredUtc' => @occurred_utc, 'Value' => @value, 'Count' => @count, 'Category' => @category } end |