Class: Memoir::DataSet
- Inherits:
-
Object
- Object
- Memoir::DataSet
- Defined in:
- lib/memoir/data_set.rb
Overview
Class representing individual results in response
Instance Attribute Summary collapse
-
#aggregated_tags ⇒ Object
Returns the value of attribute aggregated_tags.
-
#annotations ⇒ Object
Returns the value of attribute annotations.
-
#dps ⇒ Object
Returns the value of attribute dps.
-
#global_annotations ⇒ Object
Returns the value of attribute global_annotations.
-
#metric ⇒ Object
Returns the value of attribute metric.
-
#query ⇒ Object
Returns the value of attribute query.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#tsuids ⇒ Object
Returns the value of attribute tsuids.
Instance Method Summary collapse
-
#initialize(data_set) ⇒ DataSet
constructor
A new instance of DataSet.
Constructor Details
#initialize(data_set) ⇒ DataSet
Returns a new instance of DataSet.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/memoir/data_set.rb', line 5 def initialize(data_set) @metric = data_set['metric'] @tags = data_set['tags'] || {} @aggregated_tags = data_set['aggregatedTags'] || [] @annotations = data_set['annotations'] || [] @global_annotations = data_set['globalAnnotations'] || [] @tsuids = data_set['tsuids'] || [] @query = query || {} @dps = data_set['dps'] end |
Instance Attribute Details
#aggregated_tags ⇒ Object
Returns the value of attribute aggregated_tags.
3 4 5 |
# File 'lib/memoir/data_set.rb', line 3 def @aggregated_tags end |
#annotations ⇒ Object
Returns the value of attribute annotations.
3 4 5 |
# File 'lib/memoir/data_set.rb', line 3 def annotations @annotations end |
#dps ⇒ Object
Returns the value of attribute dps.
3 4 5 |
# File 'lib/memoir/data_set.rb', line 3 def dps @dps end |
#global_annotations ⇒ Object
Returns the value of attribute global_annotations.
3 4 5 |
# File 'lib/memoir/data_set.rb', line 3 def global_annotations @global_annotations end |
#metric ⇒ Object
Returns the value of attribute metric.
3 4 5 |
# File 'lib/memoir/data_set.rb', line 3 def metric @metric end |
#query ⇒ Object
Returns the value of attribute query.
3 4 5 |
# File 'lib/memoir/data_set.rb', line 3 def query @query end |
#tags ⇒ Object
Returns the value of attribute tags.
3 4 5 |
# File 'lib/memoir/data_set.rb', line 3 def @tags end |
#tsuids ⇒ Object
Returns the value of attribute tsuids.
3 4 5 |
# File 'lib/memoir/data_set.rb', line 3 def tsuids @tsuids end |