class Dry::Logic::Rule
def self.method_added(meth)
def self.method_added(meth) super if meth == :call alias_method :[], :call end end
def and(other)
def and(other) Conjunction.new(self, other) end
def curry(*args)
def curry(*args) if arity > 0 new(predicate.curry(*args)) else self end end
def each?
def each? predicate.is_a?(Rule::Each) end
def initialize(predicate, options = {})
def initialize(predicate, options = {}) @predicate = predicate @options = options end
def negation
def negation Negation.new(self) end
def new(predicate)
def new(predicate) self.class.new(predicate, options) 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 type
def type raise NotImplementedError end
def xor(other)
def xor(other) ExclusiveDisjunction.new(self, other) end