Class: Wongi::Engine::NegTemplate

Inherits:
Template
  • Object
show all
Defined in:
lib/wongi-engine/template.rb

Instance Attribute Summary

Attributes inherited from Template

#object, #predicate, #subject, #time

Instance Method Summary collapse

Methods inherited from Template

#==, #===, #=~, #contains?, #hash, hash_for, #import_into, #initialize, #inspect, #root?, #to_s, variable?

Methods included from CoreExt

included

Constructor Details

This class inherits a constructor from Wongi::Engine::Template

Instance Method Details

#compile(context) ⇒ Object

:arg: context => Wongi::Rete::BetaNode::CompilationContext



86
87
88
89
90
91
92
93
# File 'lib/wongi-engine/template.rb', line 86

def compile context
  tests, _ = *JoinNode.compile( self, context.earlier, context.parameters )
  alpha = context.rete.compile_alpha( self )
  context.node = context.node.neg_node( alpha, tests, context.alpha_deaf )
  context.node.debug = debug?
  context.earlier << self
  context
end