Class: TheCity::DonationReader

Inherits:
ApiReader show all
Defined in:
lib/readers/donation_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(donation_id, cacher = nil) ⇒ DonationReader

Constructor.

donation_id The ID of the donation to load. CacheAdapter cacher (optional) The cacher to be used to cache data.



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

def initialize(donation_id, cacher = nil)
  #@class_key = "donations_#{donation_id}"   
  @url_data_path = "/donations/#{donation_id}"
  
  # The object to store and load the cache.
  @cacher = cacher unless cacher.nil?    
end