Class: FlurryHarvest::MockClient
- Defined in:
- lib/flurry_harvest/mock_client.rb
Instance Attribute Summary
Attributes inherited from Client
#agent, #api_access_code, #api_host, #api_key, #api_port, #api_url, #debug_mode, #query, #raw_data
Instance Method Summary collapse
- #fetch_offers(options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ MockClient
constructor
A new instance of MockClient.
Methods inherited from Client
Constructor Details
#initialize(options = {}) ⇒ MockClient
Returns a new instance of MockClient.
3 4 5 6 7 8 9 |
# File 'lib/flurry_harvest/mock_client.rb', line 3 def initialize( = {}) @debug_mode = [:debug_mode] || false log "Initialize MockClient:" log "-------------" log "full options: #{}" end |
Instance Method Details
#fetch_offers(options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/flurry_harvest/mock_client.rb', line 11 def fetch_offers( = {}) log "fetch_offers.options: #{}" @raw_data = JSON.parse(File.read("#{File.dirname(__FILE__)}/../../test/fixtures/data.json")) result = decode log "Response.raw_data: #{@raw_data}" log "Result: #{result.inspect}" return result end |