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.



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

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

Instance Attribute Details

#errorsObject

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



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

def errors
  @errors
end