Exception: ApiKeys::Errors::InvalidEnvironmentError
- Inherits:
-
BaseError
- Object
- StandardError
- BaseError
- ApiKeys::Errors::InvalidEnvironmentError
- Defined in:
- lib/api_keys/errors.rb
Overview
Raised when an invalid environment is specified
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#valid_environments ⇒ Object
readonly
Returns the value of attribute valid_environments.
Instance Method Summary collapse
-
#initialize(environment:, valid_environments:) ⇒ InvalidEnvironmentError
constructor
A new instance of InvalidEnvironmentError.
Constructor Details
#initialize(environment:, valid_environments:) ⇒ InvalidEnvironmentError
Returns a new instance of InvalidEnvironmentError.
41 42 43 44 45 |
# File 'lib/api_keys/errors.rb', line 41 def initialize(environment:, valid_environments:) @environment = environment @valid_environments = valid_environments super("Invalid environment '#{environment}'. Valid environments: #{valid_environments.join(', ')}") end |
Instance Attribute Details
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
39 40 41 |
# File 'lib/api_keys/errors.rb', line 39 def environment @environment end |
#valid_environments ⇒ Object (readonly)
Returns the value of attribute valid_environments.
39 40 41 |
# File 'lib/api_keys/errors.rb', line 39 def valid_environments @valid_environments end |