Sha256: 5202b7e788e2a020ef2edd541dd00f5d7783ae022e003f8aad3e8d2840f15e76
Contents?: true
Size: 779 Bytes
Versions: 11
Compression:
Stored size: 779 Bytes
Contents
module TheCity class TagGroupListReader < 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 tag_id = options.delete(:tag_id) #@class_key = "tag_#{tag_id}_group_list_#{page}" @url_data_path = "/tags/#{tag_id}/groups" @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