Exception: Ippon::Validate::ValidationError
- Inherits:
-
StandardError
- Object
- StandardError
- Ippon::Validate::ValidationError
- Defined in:
- lib/ippon/validate.rb
Overview
An exception class which is raised by Schema#validate! when a validation error occurs.
Instance Attribute Summary collapse
-
#result ⇒ Result
readonly
The result object.
Instance Method Summary collapse
-
#errors ⇒ Array<StepError | NestedError>
A shortcut for
result.errors
. -
#initialize(result) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(result) ⇒ ValidationError
Returns a new instance of ValidationError.
468 469 470 |
# File 'lib/ippon/validate.rb', line 468 def initialize(result) @result = result end |
Instance Attribute Details
#result ⇒ Result (readonly)
Returns the result object.
466 467 468 |
# File 'lib/ippon/validate.rb', line 466 def result @result end |
Instance Method Details
#errors ⇒ Array<StepError | NestedError>
A shortcut for result.errors
.
475 476 477 |
# File 'lib/ippon/validate.rb', line 475 def errors @result.errors end |