Exception: Coercive::Error

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/coercive.rb

Overview

Public: An error raised when a coercion cannot produce a suitable result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ Error

Returns a new instance of Error.



12
13
14
15
# File 'lib/coercive.rb', line 12

def initialize(errors)
  @errors = errors
  super(errors.inspect)
end

Instance Attribute Details

#errorsObject

Public: The error or errors encountered in coercing the input.



10
11
12
# File 'lib/coercive.rb', line 10

def errors
  @errors
end