Exception: Optionoids::Errors::RequiredDataUnavailable
- Inherits:
-
StandardError
- Object
- StandardError
- Optionoids::Errors::RequiredDataUnavailable
- Defined in:
- lib/optionoids/errors.rb
Overview
Custom error class to indicate that a checker requires keys in #keys or key/values in the current option Hash, but none were provided.
Instance Attribute Summary collapse
-
#check ⇒ Object
readonly
Returns the value of attribute check.
Instance Method Summary collapse
-
#initialize(message = nil, check: nil) ⇒ RequiredDataUnavailable
constructor
A new instance of RequiredDataUnavailable.
Constructor Details
#initialize(message = nil, check: nil) ⇒ RequiredDataUnavailable
Returns a new instance of RequiredDataUnavailable.
13 14 15 16 17 |
# File 'lib/optionoids/errors.rb', line 13 def initialize( = nil, check: nil) msg = || "Required data is unavailable for the check '#{check}'" @check = check super(msg) end |
Instance Attribute Details
#check ⇒ Object (readonly)
Returns the value of attribute check.
11 12 13 |
# File 'lib/optionoids/errors.rb', line 11 def check @check end |