class Dry::Types::Default

def try(input = Undefined, &)

Other tags:
    Api: - public

Returns:
  • (Result::Success) -

Parameters:
  • input (Object) --
def try(input = Undefined, &)
  if input.equal?(Undefined)
    success(evaluate)
  else
    type.try(input)
  end
end