Class: OMF::Rete::Store::Alpha::AlphaElement

Inherits:
Object
  • Object
show all
Defined in:
lib/omf_rete/store/alpha/alpha_element.rb

Overview

Module internal class, will only be instantiated by Store

Direct Known Subclasses

AlphaInnerElement, AlphaLeafElement

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(level, store) ⇒ AlphaElement

Returns a new instance of AlphaElement.



17
18
19
20
# File 'lib/omf_rete/store/alpha/alpha_element.rb', line 17

def initialize(level, store)
  @level = level
  @store = store
end

Class Method Details

.create(level, length, store) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/omf_rete/store/alpha/alpha_element.rb', line 8

def self.create(level, length, store)
  rem = length - level
  if (rem > 1)
    AlphaInnerElement.new(level, length, store)
  else
    AlphaLeafElement.new(level, store)
  end
end