Exception: NsOptions::Option::CoerceError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/ns-options/option.rb

Instance Method Summary collapse

Constructor Details

#initialize(type_class, value, err) ⇒ CoerceError

Returns a new instance of CoerceError.



6
7
8
9
# File 'lib/ns-options/option.rb', line 6

def initialize(type_class, value, err)
  super("can't coerce `#{value.inspect}' to `#{type_class}': #{err.message}")
  set_backtrace(err.backtrace)
end