Class: Sportradar::Api::Config
- Inherits:
-
Object
- Object
- Sportradar::Api::Config
- Defined in:
- lib/sportradar/api/config.rb
Instance Attribute Summary collapse
-
#api_timeout ⇒ Object
Returns the value of attribute api_timeout.
-
#format ⇒ Object
Returns the value of attribute format.
-
#use_ssl ⇒ Object
Returns the value of attribute use_ssl.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #reset ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
19 20 21 22 23 24 |
# File 'lib/sportradar/api/config.rb', line 19 def initialize @api_key = ENV['API_KEY'] @api_timeout = ENV.fetch('SPORTRADAR_API_TIMEOUT', 15 ) @use_ssl = ENV.fetch('SPORTRADAR_API_USE_SSL', true) @format = ENV.fetch("SPORTRADAR_API_FORMAT", :xml).to_s end |
Instance Attribute Details
#api_timeout ⇒ Object
Returns the value of attribute api_timeout.
17 18 19 |
# File 'lib/sportradar/api/config.rb', line 17 def api_timeout @api_timeout end |
#format ⇒ Object
Returns the value of attribute format.
17 18 19 |
# File 'lib/sportradar/api/config.rb', line 17 def format @format end |
#use_ssl ⇒ Object
Returns the value of attribute use_ssl.
17 18 19 |
# File 'lib/sportradar/api/config.rb', line 17 def use_ssl @use_ssl end |
Instance Method Details
#reset ⇒ Object
26 27 28 29 30 |
# File 'lib/sportradar/api/config.rb', line 26 def reset @api_timeout = ENV.fetch('SPORTRADAR_API_TIMEOUT', 15 ) @use_ssl = ENV.fetch('SPORTRADAR_API_USE_SSL', true) @format = ENV.fetch("SPORTRADAR_API_FORMAT", :xml).to_s end |