Class: TheCity::GroupRoleListReader
- Defined in:
- lib/readers/group_role_list_reader.rb
Instance Attribute Summary
Attributes inherited from ApiReader
Instance Method Summary collapse
-
#initialize(options = {}, cacher = nil) ⇒ GroupRoleListReader
constructor
Constructor.
- #white_list_options(options) ⇒ Object
Methods inherited from ApiReader
#load_feed, #rate_limit, #rate_limit_remaining
Constructor Details
#initialize(options = {}, cacher = nil) ⇒ GroupRoleListReader
Constructor.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/readers/group_role_list_reader.rb', line 10 def initialize( = {}, cacher = nil) [:page] ||= 1 group_id = .delete(:group_id) #@class_key = "groups_#{group_id}_roles_#{page}" @url_data_path = "/groups/#{group_id}/roles" @url_data_params = () # The object to store and load the cache. @cacher = cacher unless cacher.nil? end |
Instance Method Details
#white_list_options(options) ⇒ Object
21 22 23 24 |
# File 'lib/readers/group_role_list_reader.rb', line 21 def () white_list = [:page, :title, :include_inactive] .clone.delete_if { |key, value| !white_list.include?(key) } end |