lib/redwood/node.rb in redwood-0.1.1 vs lib/redwood/node.rb in redwood-0.1.2

- old
+ new

@@ -18,14 +18,12 @@ yield child if block_given? children << child child end - # Add a node to this nodes children, and return the child + # Graft a child def <<(child) - child.instance_variable_set(:@parent, self) - children << child - child + graft child end # Lookup a child node by its name def [](key) selected_child = children.select {|child| child.name == key } \ No newline at end of file