class School::ProcPattern

Overview

A pattern that wraps a proc.

Defined in:

school/rule/pattern.cr

Constructors

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

Constructor Detail

def self.new(proc : ProcType) #

[View source]

Instance Method Detail

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]
def vars : Enumerable(String) #

Returns the variables in the pattern.


[View source]