Exception: Dennis::ValidationError
- Defined in:
- lib/dennis/validation_error.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(errors) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #to_s ⇒ Object
Constructor Details
#initialize(errors) ⇒ ValidationError
Returns a new instance of ValidationError.
11 12 13 14 |
# File 'lib/dennis/validation_error.rb', line 11 def initialize(errors) super @errors = errors.map { |e| ValidationErrorDetail.new(e) } end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
9 10 11 |
# File 'lib/dennis/validation_error.rb', line 9 def errors @errors end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/dennis/validation_error.rb', line 16 def to_s "Validation error: #{errors.map(&:message).join(', ')}" end |