abstract class School::FactPattern

Overview

Patterns that match against the Fact database.

Direct Known Subclasses

Defined in:

school/rule/pattern.cr

Instance Method Summary

Instance methods inherited from class School::BasePattern

match(bindings : Bindings, trace : TraceNode | Nil = nil, &block : Bindings -> Nil) : Nil match, to_s(io : IO) to_s, vars : Enumerable(String) vars

Instance Method Detail

abstract def match(fact : Fact, bindings : Bindings) : Bindings | Nil #

Indicates whether or not the fact matches the pattern.


[View source]
def match(bindings : Bindings, trace : TraceNode | Nil = nil, &block : Bindings -> Nil) : Nil #

Indicates whether or not any facts match the pattern.

Yields once for each match.


[View source]