Class: TheCity::MetricMeasurementReader

Inherits:
ApiReader
  • Object
show all
Defined in:
lib/readers/metric_measurement_reader.rb

Instance Attribute Summary

Attributes inherited from ApiReader

#headers

Instance Method Summary collapse

Methods inherited from ApiReader

#load_feed, #rate_limit, #rate_limit_remaining

Constructor Details

#initialize(metric_id, measurement_id, cacher = nil) ⇒ MetricMeasurementReader

Constructor.

metric_id The ID of the metric that the measurement belongs to. measurement_id The ID of the measurement to load. CacheAdapter cacher (optional) The cacher to be used to cache data.



10
11
12
13
14
15
16
# File 'lib/readers/metric_measurement_reader.rb', line 10

def initialize(metric_id, measurement_id, cacher = nil)
  #@class_key = "metrics_#{metric_id}_measurements_#{measurement_id}"   
  @url_data_path = "/metrics/#{metric_id}/measurements/#{measurement_id}"
  
  # The object to store and load the cache.
  @cacher = cacher unless cacher.nil?    
end