Class: ReevooMark::Client
- Inherits:
-
Object
- Object
- ReevooMark::Client
- Defined in:
- lib/reevoomark/client.rb
Constant Summary collapse
- DEFAULT_URL =
'http://mark.reevoo.com/reevoomark/embeddable_reviews.html'
Instance Method Summary collapse
- #fetch(trkref, sku) ⇒ Object
-
#initialize(cache, fetcher, url = DEFAULT_URL) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(cache, fetcher, url = DEFAULT_URL) ⇒ Client
Returns a new instance of Client.
4 5 6 |
# File 'lib/reevoomark/client.rb', line 4 def initialize(cache, fetcher, url = DEFAULT_URL) @cache, @fetcher, @url = cache, fetcher, url end |
Instance Method Details
#fetch(trkref, sku) ⇒ Object
8 9 10 11 |
# File 'lib/reevoomark/client.rb', line 8 def fetch(trkref, sku) remote_url = url_for(trkref, sku) @cache.fetch(remote_url){ remote_fetch(remote_url) } end |