class School::NullaryPattern(F)

Overview

A pattern that matches a fact.

Defined in:

school/rule/pattern.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class School::FactPattern

match(fact : Fact, bindings : Bindings) : Bindings | Nil
match(bindings : Bindings, trace : TraceNode | Nil = nil, &block : Bindings -> Nil) : Nil
match

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(fact_class : F.class) #

[View source]
def self.new #

[View source]

Class Method Detail

def self.assert(bindings : Bindings) #

Asserts the associated Fact.


[View source]
def self.retract(bindings : Bindings) #

Retracts the associated Fact.


[View source]

Instance Method Detail

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

Indicates whether or not the fact matches the pattern.


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

Returns the variables in the pattern.


[View source]