class Dry::Logic::Rule
def and(other)
def and(other) Conjunction.new(self, other) end
def call(*args)
def call(*args) Logic.Result(args, predicate.call, self) end
def curry(*args)
def curry(*args) self.class.new(name, predicate.curry(*args)) end
def initialize(name, predicate)
def initialize(name, predicate) @name = name @predicate = predicate end
def negation
def negation Negation.new(self) end
def new(predicate)
def new(predicate) self.class.new(name, predicate) end
def or(other)
def or(other) Disjunction.new(self, other) end
def predicate_id
def predicate_id predicate.id end
def then(other)
def then(other) Implication.new(self, other) end
def to_ary
def to_ary [type, [name, predicate.to_ary]] end
def type
def type :rule end
def xor(other)
def xor(other) ExclusiveDisjunction.new(self, other) end