Exception: OFlow::ValidateError
- Inherits:
-
Exception
- Object
- Exception
- OFlow::ValidateError
- Defined in:
- lib/oflow/errors.rb
Overview
An Exception raised when there are validation errors.
Defined Under Namespace
Classes: Problem
Instance Attribute Summary collapse
-
#problems ⇒ Object
Returns the value of attribute problems.
Instance Method Summary collapse
-
#initialize(errors) ⇒ ValidateError
constructor
A new instance of ValidateError.
Constructor Details
#initialize(errors) ⇒ ValidateError
Returns a new instance of ValidateError.
58 59 60 61 62 63 |
# File 'lib/oflow/errors.rb', line 58 def initialize(errors) @problems = errors ma = ["#{errors.size} validation errors."] errors.each { |e| ma << e.to_s } super(ma.join("\n ")) end |
Instance Attribute Details
#problems ⇒ Object
Returns the value of attribute problems.
56 57 58 |
# File 'lib/oflow/errors.rb', line 56 def problems @problems end |