Class: FrederickAPI::Configuration
- Inherits:
-
Object
- Object
- FrederickAPI::Configuration
- Defined in:
- lib/frederick_api/configuration.rb
Overview
You may use ‘FrederickAPI.configure` to configure the Frederick Internal API Gem or you can use environment variables. By default, the client will connect to staging with a blank API key.
Constant Summary collapse
- DEFAULTS =
{ base_url: ENV['FREDERICK_API_BASE_URL'] || 'https://api.staging.hirefrederick.com', public_base_url: ENV['FREDERICK_API_PUBLIC_BASE_URL'] || 'https://api.public.staging.hirefrederick.com', api_key: ENV['FREDERICK_API_KEY'] }.freeze
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#public_base_url ⇒ Object
Returns the value of attribute public_base_url.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
23 24 25 26 27 |
# File 'lib/frederick_api/configuration.rb', line 23 def initialize @base_url = DEFAULTS[:base_url] @public_base_url = DEFAULTS[:public_base_url] @api_key = DEFAULTS[:api_key] end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
21 22 23 |
# File 'lib/frederick_api/configuration.rb', line 21 def api_key @api_key end |
#base_url ⇒ Object
Returns the value of attribute base_url.
21 22 23 |
# File 'lib/frederick_api/configuration.rb', line 21 def base_url @base_url end |
#public_base_url ⇒ Object
Returns the value of attribute public_base_url.
21 22 23 |
# File 'lib/frederick_api/configuration.rb', line 21 def public_base_url @public_base_url end |