Module: ParamsReady::Value::Coercion

Included in:
Coder, ParamsReady::Value::Coder::Instantiable, GenericCoder
Defined in:
lib/params_ready/value/coder.rb

Instance Method Summary collapse

Instance Method Details

#strict_default?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/params_ready/value/coder.rb', line 16

def strict_default?
  true
end

#try_coerce(input, context) ⇒ Object



10
11
12
13
14
# File 'lib/params_ready/value/coder.rb', line 10

def try_coerce(input, context)
  coerce input, context
rescue => _error
  raise CoercionError.new(input, value_class_name)
end