Sha256: fe4fc83b422ddff4a59db54d108104291ea9aad39b1ecad07005a8faeabfbfb2
Contents?: true
Size: 712 Bytes
Versions: 11
Compression:
Stored size: 712 Bytes
Contents
module TheCity class MetricListReader < ApiReader # Constructor. # # @param options A hash of options for requesting data from the server. # @param [CacheAdapter] cacher (optional) The cacher to be used to cache data. def initialize(options = {}, cacher = nil) options[:page] ||= 1 #@class_key = "metric_list_#{page}" @url_data_path = "/metrics" @url_data_params = white_list_options(options) # The object to store and load the cache. @cacher = cacher unless cacher.nil? end def white_list_options(options) white_list = [:page] options.clone.delete_if { |key, value| !white_list.include?(key) } end end end
Version data entries
11 entries across 11 versions & 1 rubygems