Class: DashX::Config
- Inherits:
-
Object
- Object
- DashX::Config
- Defined in:
- lib/dashx/config.rb
Instance Attribute Summary collapse
-
#base_uri ⇒ Object
Returns the value of attribute base_uri.
-
#private_key ⇒ Object
Returns the value of attribute private_key.
-
#public_key ⇒ Object
Returns the value of attribute public_key.
-
#target_environment ⇒ Object
Returns the value of attribute target_environment.
Instance Method Summary collapse
Instance Attribute Details
#base_uri ⇒ Object
Returns the value of attribute base_uri.
5 6 7 |
# File 'lib/dashx/config.rb', line 5 def base_uri @base_uri end |
#private_key ⇒ Object
Returns the value of attribute private_key.
7 8 9 |
# File 'lib/dashx/config.rb', line 7 def private_key @private_key end |
#public_key ⇒ Object
Returns the value of attribute public_key.
6 7 8 |
# File 'lib/dashx/config.rb', line 6 def public_key @public_key end |
#target_environment ⇒ Object
Returns the value of attribute target_environment.
8 9 10 |
# File 'lib/dashx/config.rb', line 8 def target_environment @target_environment end |
Instance Method Details
#validate! ⇒ Object
10 11 12 13 14 |
# File 'lib/dashx/config.rb', line 10 def validate! raise ConfigurationError, 'public_key must be set' if public_key.nil? || public_key.empty? raise ConfigurationError, 'private_key must be set' if private_key.nil? || private_key.empty? raise ConfigurationError, 'target_environment must be set' if target_environment.nil? || target_environment.empty? end |