Exception: Voodoo::Validator::ValidationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/voodoo/validator.rb

Overview

Base class for errors signaled by the Validator.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code = nil) ⇒ ValidationError

Returns a new instance of ValidationError.



358
359
360
361
# File 'lib/voodoo/validator.rb', line 358

def initialize message, code = nil
  super message
  @code = code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



362
363
364
# File 'lib/voodoo/validator.rb', line 362

def code
  @code
end