Exception: Qwack::Errors::ValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/qwack/errors.rb

Overview

Wrapper exception around validation errors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(validation_errors = []) ⇒ ValidationError

Returns a new instance of ValidationError.



11
12
13
14
# File 'lib/qwack/errors.rb', line 11

def initialize(validation_errors = [])
  @validation_errors = validation_errors
  super("Found the following errors:\n #{validation_errors.pretty_inspect}")
end

Instance Attribute Details

#validation_errorsObject (readonly)

Returns the value of attribute validation_errors.



9
10
11
# File 'lib/qwack/errors.rb', line 9

def validation_errors
  @validation_errors
end