Method: Birch::Tree#initialize

Defined in:
ext/birch/native.c,
lib/birch/pure.rb

#initialize(value, id) ⇒ Object

Initialize the node with its value and id. Setup containers for the children, features and dependencies of this node.



13
14
15
16
17
18
19
20
# File 'ext/birch/native.c', line 13

def initialize(value, id)
  @value, @id = value, id
  @parent = nil
  @children = []
  @children_hash = {}
  @features = {}
  @edges = []
end