class School::Rule::Builder

Overview

Rule builder.

Used internally to build rules with a DSL.

Defined in:

school/rule/builder.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, *, trace : Bool = false) #

[View source]

Instance Method Detail

def action(&action : Action) #

[View source]
def action(action : Action) #

[View source]
def any(f : Fact.class, m1, m2) #

[View source]
def any(m1, f : Fact.class, m2) #

[View source]
def any(m1, m2, f : Fact.class) #

[View source]
def any(p : Pattern.class, m1, m2, **options) #

[View source]
def any(m1, p : Pattern.class, m2, **options) #

[View source]
def any(m1, m2, p : Pattern.class, **options) #

[View source]
def any(f : Fact.class, m) #

[View source]
def any(m, f : Fact.class) #

[View source]
def any(p : Pattern.class, m, **options) #

[View source]
def any(m, p : Pattern.class, **options) #

[View source]
def any(f : Fact.class) #

[View source]
def any(block : ProcPattern::ProcType) #

[View source]
def any(p : Pattern.class, **options) #

[View source]
def any(&block : ProcPattern::ProcType) #

[View source]
def assert(f : Fact.class, m1, m2) #

[View source]
def assert(m1, f : Fact.class, m2) #

[View source]
def assert(m1, m2, f : Fact.class) #

[View source]
def assert(p : Pattern.class, m1, m2, **options) #

[View source]
def assert(m1, p : Pattern.class, m2, **options) #

[View source]
def assert(m1, m2, p : Pattern.class, **options) #

[View source]
def assert(f : Fact.class, m) #

[View source]
def assert(m, f : Fact.class) #

[View source]
def assert(p : Pattern.class, m, **options) #

[View source]
def assert(m, p : Pattern.class, **options) #

[View source]
def assert(f : Fact.class) #

[View source]
def assert(p : Pattern.class, **options) #

[View source]
def build #

Builds the rule.

Every invocation returns the same rule (it is built once and memoized).


[View source]
def condition(f : Fact.class, m1, m2) #

[View source]
def condition(m1, f : Fact.class, m2) #

[View source]
def condition(m1, m2, f : Fact.class) #

[View source]
def condition(p : Pattern.class, m1, m2, **options) #

[View source]
def condition(m1, p : Pattern.class, m2, **options) #

[View source]
def condition(m1, m2, p : Pattern.class, **options) #

[View source]
def condition(f : Fact.class, m) #

[View source]
def condition(m, f : Fact.class) #

[View source]
def condition(p : Pattern.class, m, **options) #

[View source]
def condition(m, p : Pattern.class, **options) #

[View source]
def condition(f : Fact.class) #

[View source]
def condition(block : ProcPattern::ProcType) #

[View source]
def condition(p : Pattern.class, **options) #

[View source]
def condition(&block : ProcPattern::ProcType) #

[View source]
def none(f : Fact.class, m1, m2) #

[View source]
def none(m1, f : Fact.class, m2) #

[View source]
def none(m1, m2, f : Fact.class) #

[View source]
def none(p : Pattern.class, m1, m2, **options) #

[View source]
def none(m1, p : Pattern.class, m2, **options) #

[View source]
def none(m1, m2, p : Pattern.class, **options) #

[View source]
def none(f : Fact.class, m) #

[View source]
def none(m, f : Fact.class) #

[View source]
def none(p : Pattern.class, m, **options) #

[View source]
def none(m, p : Pattern.class, **options) #

[View source]
def none(f : Fact.class) #

[View source]
def none(block : ProcPattern::ProcType) #

[View source]
def none(p : Pattern.class, **options) #

[View source]
def none(&block : ProcPattern::ProcType) #

[View source]
def not(any) #

Returns a not expression.


[View source]
def retract(f : Fact.class, m1, m2) #

[View source]
def retract(m1, f : Fact.class, m2) #

[View source]
def retract(m1, m2, f : Fact.class) #

[View source]
def retract(p : Pattern.class, m1, m2, **options) #

[View source]
def retract(m1, p : Pattern.class, m2, **options) #

[View source]
def retract(m1, m2, p : Pattern.class, **options) #

[View source]
def retract(f : Fact.class, m) #

[View source]
def retract(m, f : Fact.class) #

[View source]
def retract(p : Pattern.class, m, **options) #

[View source]
def retract(m, p : Pattern.class, **options) #

[View source]
def retract(f : Fact.class) #

[View source]
def retract(p : Pattern.class, **options) #

[View source]
def var(name : String) #

Returns a new variable.


[View source]
def within(*any) #

[View source]