Class: TheCity::FamilyReader

Inherits:
ApiReader show all
Defined in:
lib/readers/family_reader.rb

Instance Attribute Summary

Attributes inherited from ApiReader

#headers

Instance Method Summary collapse

Methods inherited from ApiReader

#load_feed, #rate_limit, #rate_limit_remaining

Constructor Details

#initialize(options = {}, cacher = nil) ⇒ FamilyReader

Constructor.

Parameters:

  • options (defaults to: {})

    A hash of options for requesting data from the server.

  • cacher (CacheAdapter) (defaults to: nil)

    (optional) The cacher to be used to cache data.



9
10
11
12
13
14
15
16
17
# File 'lib/readers/family_reader.rb', line 9

def initialize(options = {}, cacher = nil)
  id = options[:id] || options[:external_id]
 # @class_key = "family_#{id}"   
  @url_data_path = "/families/#{id}"
  @url_data_params = {}
  
  # The object to store and load the cache.
  @cacher = cacher unless cacher.nil?    
end