Exception: OFlow::ValidateError

Inherits:
Exception
  • Object
show all
Defined in:
lib/oflow/errors.rb

Overview

An Exception raised when there are validation errors.

Defined Under Namespace

Classes: Problem

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#problemsObject

Returns the value of attribute problems.



56
57
58
# File 'lib/oflow/errors.rb', line 56

def problems
  @problems
end