class School::Pattern::None

Overview

A special pattern that indicates a condition that is satisfied if and only if no facts match the wrapped pattern.

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(pattern : Pattern) #

[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 to_s(io : IO) #

Appends a short String representation of this object.


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

Returns the variables in the pattern.


[View source]