Class: TheCity::UserProcessAnswerListReader
- Defined in:
- lib/readers/user_process_answer_list_reader.rb
Instance Attribute Summary
Attributes inherited from ApiReader
Instance Method Summary collapse
-
#initialize(options = {}, cacher = nil) ⇒ UserProcessAnswerListReader
constructor
Constructor.
- #white_list_options(options) ⇒ Object
Methods inherited from ApiReader
#load_feed, #rate_limit, #rate_limit_remaining
Constructor Details
#initialize(options = {}, cacher = nil) ⇒ UserProcessAnswerListReader
Constructor.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/readers/user_process_answer_list_reader.rb', line 10 def initialize( = {}, cacher = nil) [:page] ||= 1 user_id = .delete(:user_id) process_id = .delete(:process_id) #@class_key = "users_#{user_id}_processes_#{page}" @url_data_path = "/users/#{user_id}/processes/#{process_id}/answers" @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
22 23 24 25 |
# File 'lib/readers/user_process_answer_list_reader.rb', line 22 def () white_list = [:page] .clone.delete_if { |key, value| !white_list.include?(key) } end |