Sha256: 5d76fa41c2cf40c8ce217919238aee393f779c9f066914a89155b041215b318f
Contents?: true
Size: 855 Bytes
Versions: 11
Compression:
Stored size: 855 Bytes
Contents
module TheCity class UserAdminPrivilegeListReader < ApiReader # Constructor. # # @param options A hash of options for requesting data from the server. # :: user_id is required # @param [CacheAdapter] cacher (optional) The cacher to be used to cache data. def initialize(options = {}, cacher = nil) options[:page] ||= 1 user_id = options.delete(:user_id) #@class_key = "users_#{user_id}_admin_privileges_#{page}" @url_data_path = "/users/#{user_id}/admin_privileges" @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