Class: TheCity::PledgeReader
- Defined in:
- lib/readers/pledge_reader.rb
Instance Attribute Summary
Attributes inherited from ApiReader
Instance Method Summary collapse
-
#initialize(pledge_id, cacher = nil) ⇒ PledgeReader
constructor
Constructor.
Methods inherited from ApiReader
#load_feed, #rate_limit, #rate_limit_remaining
Constructor Details
#initialize(pledge_id, cacher = nil) ⇒ PledgeReader
Constructor.
pledge_id The ID of the pledge to load. CacheAdapter cacher (optional) The cacher to be used to cache data.
9 10 11 12 13 14 15 |
# File 'lib/readers/pledge_reader.rb', line 9 def initialize(pledge_id, cacher = nil) #@class_key = "pledges_#{pledge_id}" @url_data_path = "/pledges/#{pledge_id}" # The object to store and load the cache. @cacher = cacher unless cacher.nil? end |