Class: Cloudenv::Configuration
- Inherits:
-
Object
- Object
- Cloudenv::Configuration
- Defined in:
- lib/cloudenv/configuration.rb
Constant Summary collapse
- DEFAULT_ENDPOINT =
'https://cloudenv.herokuapp.com/api'
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
Instance Method Summary collapse
- #configure {|_self| ... } ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 |
# File 'lib/cloudenv/configuration.rb', line 8 def initialize self.api_key = ENV['CLOUDENV_API_KEY'] self.endpoint = DEFAULT_ENDPOINT end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/cloudenv/configuration.rb', line 5 def api_key @api_key end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
6 7 8 |
# File 'lib/cloudenv/configuration.rb', line 6 def endpoint @endpoint end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
13 14 15 16 |
# File 'lib/cloudenv/configuration.rb', line 13 def configure yield self self end |