Class: TheCity::UserListReader
- Defined in:
- lib/readers/user_list_reader.rb
Instance Attribute Summary
Attributes inherited from ApiReader
Instance Method Summary collapse
-
#initialize(options = {}, cacher = nil) ⇒ UserListReader
constructor
Constructor.
- #white_list_options(options) ⇒ Object
Methods inherited from ApiReader
#load_feed, #rate_limit, #rate_limit_remaining
Constructor Details
#initialize(options = {}, cacher = nil) ⇒ UserListReader
Constructor.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/readers/user_list_reader.rb', line 9 def initialize( = {}, cacher = nil) [:page] ||= 1 #@class_key = "user_list_#{page}_#{filter.to_s.downcase.gsub(' ','')}" @url_data_path = "/users" @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
20 21 22 23 |
# File 'lib/readers/user_list_reader.rb', line 20 def () white_list = [:page, :per_page, :filter, :include_participation, :include_custom_fields, :include_barcodes, :include_addresses, :include_family] .clone.delete_if { |key, value| !white_list.include?(key) } end |