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.
51 52 53 54 55 56 |
# File 'lib/oflow/errors.rb', line 51 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.
49 50 51 |
# File 'lib/oflow/errors.rb', line 49 def problems @problems end |