Exception: Wrapture::InvalidSpecKey
- Inherits:
-
WraptureError
- Object
- StandardError
- WraptureError
- Wrapture::InvalidSpecKey
- Defined in:
- lib/wrapture/errors.rb
Overview
The spec has a key that is not valid.
Instance Method Summary collapse
-
#initialize(message, valid_keys: []) ⇒ InvalidSpecKey
constructor
Creates an InvalidSpecKey with the given message.
Constructor Details
#initialize(message, valid_keys: []) ⇒ InvalidSpecKey
Creates an InvalidSpecKey with the given message. A list of valid values
may optionally be passed to valid_keys which will be added to the end
of the message.
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/wrapture/errors.rb', line 39 def initialize(, valid_keys: []) = .dup unless valid_keys.empty? << ' (valid values are \'' << valid_keys.join('\', \'') << '\')' end super() end |