class Dry::Types::Implication
@api public
Implication type
def self.operator = :>
def self.operator = :>
def call_safe(input, &)
- Api: - private
Returns:
-
(Object)
-
Parameters:
-
input
(Object
) --
def call_safe(input, &) if left.try(input).success? right.call_safe(input, &) else input end end
def call_unsafe(input)
- Api: - private
Returns:
-
(Object)
-
Parameters:
-
input
(Object
) --
def call_unsafe(input) if left.try(input).success? right.call_unsafe(input) else input end end
def primitive?(value)
- Api: - private
Returns:
-
(Boolean)
-
Parameters:
-
value
(Object
) --
def primitive?(value) if left.primitive?(value) right.primitive?(value) else true end end
def try(input, &)
- Api: - public
Parameters:
-
input
(Object
) --
def try(input, &) if left.try(input).success? right.try(input, &) else Result::Success.new(input) end end