Exception: Relaxo::Model::ValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/relaxo/model/document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(document, errors) ⇒ ValidationError

Returns a new instance of ValidationError.



28
29
30
31
32
33
# File 'lib/relaxo/model/document.rb', line 28

def initialize(document, errors)
	@document = document
	@errors = errors
	
	super "Failed to validate document #{@document} because: #{@errors.join(', ')}!"
end

Instance Attribute Details

#documentObject (readonly)

Returns the value of attribute document.



35
36
37
# File 'lib/relaxo/model/document.rb', line 35

def document
  @document
end

#errorsObject (readonly)

Returns the value of attribute errors.



36
37
38
# File 'lib/relaxo/model/document.rb', line 36

def errors
  @errors
end