Exception: Optionoids::Errors::UnexpectedBlankValue
- Inherits:
-
StandardError
- Object
- StandardError
- Optionoids::Errors::UnexpectedBlankValue
- Defined in:
- lib/optionoids/errors.rb
Overview
Custom error class to indicate that some values ate unexpectedly blank or nil
Instance Attribute Summary collapse
-
#keys ⇒ Object
readonly
Returns the value of attribute keys.
Instance Method Summary collapse
-
#initialize(message = nil, keys: []) ⇒ UnexpectedBlankValue
constructor
A new instance of UnexpectedBlankValue.
Constructor Details
#initialize(message = nil, keys: []) ⇒ UnexpectedBlankValue
Returns a new instance of UnexpectedBlankValue.
46 47 48 49 50 |
# File 'lib/optionoids/errors.rb', line 46 def initialize( = nil, keys: []) @keys = keys msg = || "Unexpected blank values for keys: #{keys.to_sentence}" super(msg) end |
Instance Attribute Details
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
44 45 46 |
# File 'lib/optionoids/errors.rb', line 44 def keys @keys end |