class School::Rule
- School::Rule
- Reference
- Object
Overview
A rule is collection of conditions (patterns) that match against facts, and associated actions.
Defined in:
school/rule/builder.crschool/rule/rule.cr
Constructors
- .new(name : String, conditions : Array(BasePattern), actions : Array(Action), *, trace : Bool = false)
- .new(name : String)
Instance Method Summary
- #actions
-
#call(bindings : Bindings)
Invokes the rule's actions.
- #conditions
- #name : String
- #trace : Bool
-
#vars : Enumerable(String)
Returns the variables in the conditions.
Constructor Detail
def self.new(name : String, conditions : Array(BasePattern), actions : Array(Action), *, trace : Bool = false)
#