Class: Memoir::DataSet

Inherits:
Object
  • Object
show all
Defined in:
lib/memoir/data_set.rb

Overview

Class representing individual results in response

Instance Attribute Summary collapse

Instance Method Summary collapse

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_tagsObject

Returns the value of attribute aggregated_tags.



3
4
5
# File 'lib/memoir/data_set.rb', line 3

def aggregated_tags
  @aggregated_tags
end

#annotationsObject

Returns the value of attribute annotations.



3
4
5
# File 'lib/memoir/data_set.rb', line 3

def annotations
  @annotations
end

#dpsObject

Returns the value of attribute dps.



3
4
5
# File 'lib/memoir/data_set.rb', line 3

def dps
  @dps
end

#global_annotationsObject

Returns the value of attribute global_annotations.



3
4
5
# File 'lib/memoir/data_set.rb', line 3

def global_annotations
  @global_annotations
end

#metricObject

Returns the value of attribute metric.



3
4
5
# File 'lib/memoir/data_set.rb', line 3

def metric
  @metric
end

#queryObject

Returns the value of attribute query.



3
4
5
# File 'lib/memoir/data_set.rb', line 3

def query
  @query
end

#tagsObject

Returns the value of attribute tags.



3
4
5
# File 'lib/memoir/data_set.rb', line 3

def tags
  @tags
end

#tsuidsObject

Returns the value of attribute tsuids.



3
4
5
# File 'lib/memoir/data_set.rb', line 3

def tsuids
  @tsuids
end