Class: Mutations::YoValidationException
- Inherits:
-
ValidationException
- Object
- ValidationException
- Mutations::YoValidationException
- Defined in:
- lib/mutations_validate_outcome.rb
Instance Attribute Summary collapse
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
Instance Method Summary collapse
-
#initialize(e, owner = nil) ⇒ YoValidationException
constructor
A new instance of YoValidationException.
Methods inherited from ValidationException
Constructor Details
#initialize(e, owner = nil) ⇒ YoValidationException
Returns a new instance of YoValidationException.
70 71 72 73 |
# File 'lib/mutations_validate_outcome.rb', line 70 def initialize(e, owner = nil) super(e.is_a?(ValidationException) ? e.errors : Mutations::ErrorHash[error: Mutations::ErrorAtom.new(e..to_sym, e.class.name.to_sym, message: e.)]) @cause, @owner = e, owner || caller end |
Instance Attribute Details
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
69 70 71 |
# File 'lib/mutations_validate_outcome.rb', line 69 def cause @cause end |
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
69 70 71 |
# File 'lib/mutations_validate_outcome.rb', line 69 def owner @owner end |