Class: TheCity::DonationExportReader

Inherits:
ApiReader
  • Object
show all
Defined in:
lib/readers/donation_export_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_export_id, options = {}, cacher = nil) ⇒ DonationExportReader

Constructor.

Parameters:

  • donation_export_id

    The ID of the donation export to load.

  • options (defaults to: {})

    A hash of options for requesting data from the server.

  • cacher (optional) (defaults to: nil)

    The CacheAdapter cacher to be used to cache data.



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

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