Class: WalmartOpen::Config
- Inherits:
-
Object
- Object
- WalmartOpen::Config
- Defined in:
- lib/walmart_open/config.rb
Instance Attribute Summary collapse
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#linkshare_publisher_id ⇒ Object
Returns the value of attribute linkshare_publisher_id.
-
#product_api_key ⇒ Object
Returns the value of attribute product_api_key.
-
#product_calls_per_second ⇒ Object
Returns the value of attribute product_calls_per_second.
-
#product_domain ⇒ Object
Returns the value of attribute product_domain.
-
#product_version ⇒ Object
Returns the value of attribute product_version.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(options = {}) ⇒ Config
Returns a new instance of Config.
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/walmart_open/config.rb', line 12 def initialize( = {}) # Default to production mode. self.debug = false # Set some defaults for Product API. self.product_domain = "walmartlabs.api.mashery.com" self.product_version = "v1" self.product_calls_per_second = 5 .each do |key, value| public_send("#{key}=", value) end end |
Instance Attribute Details
#debug ⇒ Object
Returns the value of attribute debug.
5 6 7 |
# File 'lib/walmart_open/config.rb', line 5 def debug @debug end |
#linkshare_publisher_id ⇒ Object
Returns the value of attribute linkshare_publisher_id.
5 6 7 |
# File 'lib/walmart_open/config.rb', line 5 def linkshare_publisher_id @linkshare_publisher_id end |
#product_api_key ⇒ Object
Returns the value of attribute product_api_key.
5 6 7 |
# File 'lib/walmart_open/config.rb', line 5 def product_api_key @product_api_key end |
#product_calls_per_second ⇒ Object
Returns the value of attribute product_calls_per_second.
5 6 7 |
# File 'lib/walmart_open/config.rb', line 5 def product_calls_per_second @product_calls_per_second end |
#product_domain ⇒ Object
Returns the value of attribute product_domain.
5 6 7 |
# File 'lib/walmart_open/config.rb', line 5 def product_domain @product_domain end |
#product_version ⇒ Object
Returns the value of attribute product_version.
5 6 7 |
# File 'lib/walmart_open/config.rb', line 5 def product_version @product_version end |