Exception: Optionoids::Errors::UnexpectedPopulatedValue
- Inherits:
-
StandardError
- Object
- StandardError
- Optionoids::Errors::UnexpectedPopulatedValue
- Defined in:
- lib/optionoids/errors.rb
Overview
Custom error class to indicate that some values are unexpectedly populated (not blank)
Instance Attribute Summary collapse
-
#keys ⇒ Object
readonly
Returns the value of attribute keys.
Instance Method Summary collapse
-
#initialize(message = nil, keys: []) ⇒ UnexpectedPopulatedValue
constructor
A new instance of UnexpectedPopulatedValue.
Constructor Details
#initialize(message = nil, keys: []) ⇒ UnexpectedPopulatedValue
Returns a new instance of UnexpectedPopulatedValue.
57 58 59 60 61 |
# File 'lib/optionoids/errors.rb', line 57 def initialize( = nil, keys: []) @keys = keys msg = || "Unexpected populated values for keys: #{keys.to_sentence}" super(msg) end |
Instance Attribute Details
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
55 56 57 |
# File 'lib/optionoids/errors.rb', line 55 def keys @keys end |