Exception: Relaxo::Model::ValidationFailure
- Inherits:
-
StandardError
- Object
- StandardError
- Relaxo::Model::ValidationFailure
- Defined in:
- lib/relaxo/model/document.rb
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(document, errors) ⇒ ValidationFailure
constructor
A new instance of ValidationFailure.
Constructor Details
#initialize(document, errors) ⇒ ValidationFailure
Returns a new instance of ValidationFailure.
28 29 30 31 32 33 |
# File 'lib/relaxo/model/document.rb', line 28 def initialize(document, errors) @document = document @errors = errors super "Failed to validate document #{@document} because: #{@errors.join(', ')}!" end |
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
35 36 37 |
# File 'lib/relaxo/model/document.rb', line 35 def document @document end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
36 37 38 |
# File 'lib/relaxo/model/document.rb', line 36 def errors @errors end |