Class: Sportradar::Api::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

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_timeoutObject

Returns the value of attribute api_timeout.



17
18
19
# File 'lib/sportradar/api/config.rb', line 17

def api_timeout
  @api_timeout
end

#formatObject

Returns the value of attribute format.



17
18
19
# File 'lib/sportradar/api/config.rb', line 17

def format
  @format
end

#use_sslObject

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

#resetObject



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