class School::Rule

Overview

A rule is collection of conditions (patterns) that match against facts, and associated actions.

Defined in:

school/rule/builder.cr
school/rule/rule.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, conditions : Array(BasePattern), actions : Array(Action), *, trace : Bool = false) #

[View source]
def self.new(name : String) #

[View source]

Instance Method Detail

def actions #

[View source]
def call(bindings : Bindings) #

Invokes the rule's actions.


[View source]
def conditions #

[View source]
def name : String #

[View source]
def trace : Bool #

[View source]
def vars : Enumerable(String) #

Returns the variables in the conditions.


[View source]