Class: Tazworks::Config
- Inherits:
-
Object
- Object
- Tazworks::Config
- Defined in:
- lib/tazworks/config.rb
Overview
Tazworks Set Configuration
Constant Summary collapse
- DEFAULT_SANDBOX_HOST =
'https://api-sandbox.instascreen.net'
- DEFAULT_PRODUCTION_HOST =
'https://api.instascreen.net'
- DEFAULT_PORT =
443
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#host ⇒ Object
Returns the value of attribute host.
-
#port ⇒ Object
Returns the value of attribute port.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
Instance Method Summary collapse
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
10 11 12 |
# File 'lib/tazworks/config.rb', line 10 def api_key @api_key end |
#host ⇒ Object
Returns the value of attribute host.
10 11 12 |
# File 'lib/tazworks/config.rb', line 10 def host @host end |
#port ⇒ Object
Returns the value of attribute port.
10 11 12 |
# File 'lib/tazworks/config.rb', line 10 def port @port end |
#sandbox ⇒ Object
Returns the value of attribute sandbox.
10 11 12 |
# File 'lib/tazworks/config.rb', line 10 def sandbox @sandbox end |
Instance Method Details
#base_uri ⇒ Object
12 13 14 15 16 |
# File 'lib/tazworks/config.rb', line 12 def base_uri host = @host host ||= @sandbox ? DEFAULT_SANDBOX_HOST : DEFAULT_PRODUCTION_HOST URI.parse("#{host}:#{@port || DEFAULT_PORT}") end |