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.
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 28 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.
25 26 27 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 25 def category @category end |
#count ⇒ Object
Returns the value of attribute count.
25 26 27 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 25 def count @count end |
#metric_id ⇒ Object
Returns the value of attribute metric_id.
25 26 27 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 25 def metric_id @metric_id end |
#metric_type ⇒ Object
Returns the value of attribute metric_type.
25 26 27 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 25 def metric_type @metric_type end |
#name ⇒ Object
Returns the value of attribute name.
25 26 27 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 25 def name @name end |
#occurred_utc ⇒ Object
Returns the value of attribute occurred_utc.
25 26 27 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 25 def occurred_utc @occurred_utc end |
#value ⇒ Object
Returns the value of attribute value.
25 26 27 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 25 def value @value end |
Instance Method Details
#to_h ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/stackify/metrics/metric_aggregate.rb', line 39 def to_h { 'Count' => @count, 'MetricType' => @metric_type, 'MetricID' => @metric_id, 'Name' => @name, 'OccurredUtc' => @occurred_utc, 'Value' => @value, 'Count' => @count, 'Category' => @category } end |