Class: WalmartOpen::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/walmart_open/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options = {})
  # 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

  options.each do |key, value|
    public_send("#{key}=", value)
  end
end

Instance Attribute Details

#debugObject

Returns the value of attribute debug.



5
6
7
# File 'lib/walmart_open/config.rb', line 5

def debug
  @debug
end

#linkshare_publisher_idObject

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_keyObject

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_secondObject

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_domainObject

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_versionObject

Returns the value of attribute product_version.



5
6
7
# File 'lib/walmart_open/config.rb', line 5

def product_version
  @product_version
end