Exception: ZeroRuby::ValidationError

Inherits:
Error
  • Object
show all
Defined in:
lib/zero_ruby/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#details

Instance Method Summary collapse

Methods inherited from Error

#error_type

Constructor Details

#initialize(errors) ⇒ ValidationError

Returns a new instance of ValidationError.



21
22
23
24
# File 'lib/zero_ruby/errors.rb', line 21

def initialize(errors)
  @errors = Array(errors)
  super(@errors.join(", "))
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



19
20
21
# File 'lib/zero_ruby/errors.rb', line 19

def errors
  @errors
end