Exception: ApiKeys::Errors::KeyLimitExceededError
- Defined in:
- lib/api_keys/errors.rb
Overview
Raised when key limit per type/environment is exceeded
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#key_type ⇒ Object
readonly
Returns the value of attribute key_type.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
Instance Method Summary collapse
-
#initialize(key_type:, environment:, limit:) ⇒ KeyLimitExceededError
constructor
A new instance of KeyLimitExceededError.
Constructor Details
#initialize(key_type:, environment:, limit:) ⇒ KeyLimitExceededError
Returns a new instance of KeyLimitExceededError.
52 53 54 55 56 57 |
# File 'lib/api_keys/errors.rb', line 52 def initialize(key_type:, environment:, limit:) @key_type = key_type @environment = environment @limit = limit super("Maximum number of #{key_type} keys (#{limit}) reached for #{environment} environment") end |
Instance Attribute Details
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
50 51 52 |
# File 'lib/api_keys/errors.rb', line 50 def environment @environment end |
#key_type ⇒ Object (readonly)
Returns the value of attribute key_type.
50 51 52 |
# File 'lib/api_keys/errors.rb', line 50 def key_type @key_type end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
50 51 52 |
# File 'lib/api_keys/errors.rb', line 50 def limit @limit end |