Exception: ApiKeys::Errors::EnvironmentMismatchError
- Inherits:
-
BaseError
- Object
- StandardError
- BaseError
- ApiKeys::Errors::EnvironmentMismatchError
- Defined in:
- lib/api_keys/errors.rb
Overview
Raised when API key environment doesn't match current environment (strict isolation)
Instance Attribute Summary collapse
-
#current_environment ⇒ Object
readonly
Returns the value of attribute current_environment.
-
#key_environment ⇒ Object
readonly
Returns the value of attribute key_environment.
Instance Method Summary collapse
-
#initialize(key_environment:, current_environment:) ⇒ EnvironmentMismatchError
constructor
A new instance of EnvironmentMismatchError.
Constructor Details
#initialize(key_environment:, current_environment:) ⇒ EnvironmentMismatchError
Returns a new instance of EnvironmentMismatchError.
19 20 21 22 23 |
# File 'lib/api_keys/errors.rb', line 19 def initialize(key_environment:, current_environment:) @key_environment = key_environment @current_environment = current_environment super("API key environment (#{key_environment}) does not match current environment (#{current_environment})") end |
Instance Attribute Details
#current_environment ⇒ Object (readonly)
Returns the value of attribute current_environment.
17 18 19 |
# File 'lib/api_keys/errors.rb', line 17 def current_environment @current_environment end |
#key_environment ⇒ Object (readonly)
Returns the value of attribute key_environment.
17 18 19 |
# File 'lib/api_keys/errors.rb', line 17 def key_environment @key_environment end |