Module: Unleashed::Default
- Defined in:
- lib/unleashed/default.rb
Overview
Default configuration options for Client
Constant Summary collapse
- API_DOMAIN =
Default API domain
'api.unleashedsoftware.com'.freeze
- CLIENT_TYPE_HEADER =
Default client_type_header
'API-Sandbox'.freeze
Class Method Summary collapse
-
.api_domain ⇒ String
Default API domain from ENV or API_DOMAIN.
-
.api_id ⇒ String
Default api_id from ENV.
-
.api_key ⇒ String
Default api_key from ENV.
-
.client_type_header ⇒ String
Default client_type_header from ENV.
-
.errors_format ⇒ String
Default errors_format from ENV.
-
.options ⇒ Hash
Configuration options.
Class Method Details
.api_domain ⇒ String
Default API domain from ENV or API_DOMAIN.
20 21 22 |
# File 'lib/unleashed/default.rb', line 20 def api_domain ENV['UNLEASHED_API_DOMAIN'] || API_DOMAIN end |
.api_id ⇒ String
Default api_id from ENV.
27 28 29 |
# File 'lib/unleashed/default.rb', line 27 def api_id ENV['UNLEASHED_API_ID'] end |
.api_key ⇒ String
Default api_key from ENV.
34 35 36 |
# File 'lib/unleashed/default.rb', line 34 def api_key ENV['UNLEASHED_API_KEY'] end |
.client_type_header ⇒ String
Default client_type_header from ENV.
41 42 43 |
# File 'lib/unleashed/default.rb', line 41 def client_type_header ENV['UNLEASHED_CLIENT_TYPE_HEADER'] || CLIENT_TYPE_HEADER end |
.errors_format ⇒ String
Default errors_format from ENV.
48 49 50 |
# File 'lib/unleashed/default.rb', line 48 def errors_format ENV['UNLEASHED_ERRORS_FORMAT'] || 'processed' end |
.options ⇒ Hash
Configuration options.
13 14 15 |
# File 'lib/unleashed/default.rb', line 13 def Hash[Unleashed::Configurable.keys.map { |key| [key, send(key)] }] end |