class Dry::Logic::Operations::Implication

Public Instance Methods

[](input) click to toggle source
# File lib/dry/logic/operations/implication.rb, line 29
def [](input)
  if left[input]
    right[input]
  else
    true
  end
end
call(input) click to toggle source
# File lib/dry/logic/operations/implication.rb, line 18
def call(input)
  left_result = left.(input)

  if left_result.success?
    right_result = right.(input)
    Result.new(right_result.success?, id) { right_result.to_ast }
  else
    Result::SUCCESS
  end
end
operator() click to toggle source
# File lib/dry/logic/operations/implication.rb, line 14
def operator
  :then
end
type() click to toggle source
# File lib/dry/logic/operations/implication.rb, line 10
def type
  :implication
end