Exception: Slinky::MultiError
- Inherits:
-
SlinkyError
- Object
- StandardError
- SlinkyError
- Slinky::MultiError
- Defined in:
- lib/slinky/errors.rb
Overview
Raise when there are multiple errors
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Attributes inherited from SlinkyError
Instance Method Summary collapse
-
#initialize(errors) ⇒ MultiError
constructor
A new instance of MultiError.
- #message ⇒ Object
- #messages ⇒ Object
Methods inherited from SlinkyError
batch_errors, #continue, raise
Constructor Details
#initialize(errors) ⇒ MultiError
Returns a new instance of MultiError.
74 75 76 77 78 79 80 81 |
# File 'lib/slinky/errors.rb', line 74 def initialize errors @errors = errors.map{|e| case e when MultiError then e.errors else e end }.flatten end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
72 73 74 |
# File 'lib/slinky/errors.rb', line 72 def errors @errors end |
Instance Method Details
#message ⇒ Object
83 84 85 |
# File 'lib/slinky/errors.rb', line 83 def @errors.map{|e| e.}.join(", ") end |
#messages ⇒ Object
87 88 89 |
# File 'lib/slinky/errors.rb', line 87 def @errors.map{|e| e.} end |