Exception: Optionable::Invalid
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Optionable::Invalid
- Defined in:
- lib/optionable/invalid.rb
Overview
This exception is raised whenever invalid options are found during validation.
Instance Attribute Summary collapse
- #allowed ⇒ Object
-
#key ⇒ Symbol
The name of the option.
-
#value ⇒ Object
The value provided for the option.
Instance Method Summary collapse
-
#initialize(key, value, allowed) ⇒ Invalid
constructor
Initialize the Invalid option exception.
Constructor Details
#initialize(key, value, allowed) ⇒ Invalid
Initialize the Invalid option exception.
28 29 30 31 32 33 |
# File 'lib/optionable/invalid.rb', line 28 def initialize(key, value, allowed) @key = key @value = value @allowed = allowed super() end |
Instance Attribute Details
#allowed ⇒ Object
16 |
# File 'lib/optionable/invalid.rb', line 16 attr_reader :key, :value, :allowed |
#key ⇒ Symbol
Returns The name of the option.
16 17 18 |
# File 'lib/optionable/invalid.rb', line 16 def key @key end |
#value ⇒ Object
Returns The value provided for the option.
16 |
# File 'lib/optionable/invalid.rb', line 16 attr_reader :key, :value, :allowed |