Exception: Axn::ValidationError

Inherits:
ContractViolation show all
Defined in:
lib/axn/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ ValidationError

Returns a new instance of ValidationError.



63
64
65
66
# File 'lib/axn/exceptions.rb', line 63

def initialize(errors)
  @errors = errors
  super
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



61
62
63
# File 'lib/axn/exceptions.rb', line 61

def errors
  @errors
end

Instance Method Details

#messageObject



68
# File 'lib/axn/exceptions.rb', line 68

def message = errors.full_messages.to_sentence

#to_sObject



69
# File 'lib/axn/exceptions.rb', line 69

def to_s = message