Method: Highway::Steps::Types::Any#typecheck

Defined in:
lib/highway/steps/types/any.rb

#typecheck(value) ⇒ Object?

Typecheck and coerce a value if possible.

This method returns a typechecked and coerced value or ‘nil` if value has invalid type and can’t be coerced.

Parameters:

  • value (Object)

    A value.

Returns:

  • (Object, nil)
[View source]

31
32
33
# File 'lib/highway/steps/types/any.rb', line 31

def typecheck(value)
  value
end