Exception: Attestor::InvalidError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Attestor::InvalidError
- Defined in:
- lib/attestor/invalid_error.rb
Overview
The exception to be raised when an unsafe validation fails
Instance Attribute Summary collapse
-
#messages ⇒ Array<String>
readonly
The list of validation error messages.
-
#object ⇒ Object
readonly
The invalid object.
Instance Method Summary collapse
-
#initialize(object, messages = nil) ⇒ InvalidError
constructor
A new instance of InvalidError.
Constructor Details
#initialize(object, messages = nil) ⇒ InvalidError
Returns a new instance of InvalidError.
9 10 11 12 13 |
# File 'lib/attestor/invalid_error.rb', line 9 def initialize(object, = nil) @object = object @messages = Array() freeze end |
Instance Attribute Details
#messages ⇒ Array<String> (readonly)
The list of validation error messages
25 26 27 |
# File 'lib/attestor/invalid_error.rb', line 25 def @messages end |
#object ⇒ Object (readonly)
The invalid object
19 20 21 |
# File 'lib/attestor/invalid_error.rb', line 19 def object @object end |