Class: BetfairApiNgRails::Api::Config

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

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.application_keyObject

Returns the value of attribute application_key.



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

def application_key
  @application_key
end

.cache_expireObject

Returns the value of attribute cache_expire.



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

def cache_expire
  @cache_expire
end

.endpointObject

Returns the value of attribute endpoint.



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

def endpoint
  @endpoint
end

.formatterObject

Returns the value of attribute formatter.



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

def formatter
  @formatter
end

.go_filenameObject

Returns the value of attribute go_filename.



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

def go_filename
  @go_filename
end

.go_localuserObject

Returns the value of attribute go_localuser.



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

def go_localuser
  @go_localuser
end

.keep_alive_sessionObject

Returns the value of attribute keep_alive_session.



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

def keep_alive_session
  @keep_alive_session
end

.localeObject

Returns the value of attribute locale.



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

def locale
  @locale
end

.passwordObject

Returns the value of attribute password.



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

def password
  @password
end

.proxy_enableObject

Returns the value of attribute proxy_enable.



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

def proxy_enable
  @proxy_enable
end

.proxy_urlObject

Returns the value of attribute proxy_url.



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

def proxy_url
  @proxy_url
end

.ssl_crt_filepathObject

Returns the value of attribute ssl_crt_filepath.



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

def ssl_crt_filepath
  @ssl_crt_filepath
end

.ssl_key_filepathObject

Returns the value of attribute ssl_key_filepath.



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

def ssl_key_filepath
  @ssl_key_filepath
end

.use_cacheObject

Returns the value of attribute use_cache.



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

def use_cache
  @use_cache
end

.usernameObject

Returns the value of attribute username.



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

def username
  @username
end

Class Method Details

.load_for_environment(file_path, env) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/betfair_api_ng_rails/api/config.rb', line 29

def load_for_environment(file_path, env)
  require 'yaml'
  load_config = YAML.load_file(file_path)[env]
  Api::Constants::LOADABLE_CONFIG_OPTIONS.each do |opt|
    send("#{opt}=", load_config[opt.to_s])
  end
end