Class: Unleash::Admin::Configuration
- Inherits:
-
Object
- Object
- Unleash::Admin::Configuration
- Defined in:
- lib/unleash/admin/configuration.rb
Instance Attribute Summary collapse
-
#admin_api_key ⇒ Object
Returns the value of attribute admin_api_key.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#project ⇒ Object
Returns the value of attribute project.
-
#server_url ⇒ Object
Returns the value of attribute server_url.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize {|_self| ... } ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 14 15 |
# File 'lib/unleash/admin/configuration.rb', line 8 def initialize @admin_api_key = ENV.key?('UNLEASH_ADMIN_API_KEY') ? ENV['UNLEASH_ADMIN_API_KEY'] : 'dummy' @server_url = ENV.key?('UNLEASH_SERVER_URL') ? ENV['UNLEASH_SERVER_URL'] : 'http://localhost:4242' @project = ENV.key?('UNLEASH_PROJECT_NAME') ? ENV['UNLEASH_PROJECT_NAME'] : 'default' @environment = ENV.key?('UNLEASH_ENVIRONMENT') ? ENV['UNLEASH_ENVIRONMENT'] : 'development' yield(self) if block_given? end |
Instance Attribute Details
#admin_api_key ⇒ Object
Returns the value of attribute admin_api_key.
6 7 8 |
# File 'lib/unleash/admin/configuration.rb', line 6 def admin_api_key @admin_api_key end |
#environment ⇒ Object
Returns the value of attribute environment.
6 7 8 |
# File 'lib/unleash/admin/configuration.rb', line 6 def environment @environment end |
#project ⇒ Object
Returns the value of attribute project.
6 7 8 |
# File 'lib/unleash/admin/configuration.rb', line 6 def project @project end |
#server_url ⇒ Object
Returns the value of attribute server_url.
6 7 8 |
# File 'lib/unleash/admin/configuration.rb', line 6 def server_url @server_url end |