Method: SimpleTree::InstanceMethods#root
- Defined in:
- lib/simple_tree.rb
#root ⇒ Object
Returns the root node of the tree.
36 37 38 39 40 |
# File 'lib/simple_tree.rb', line 36 def root node = self node = node.parent while node.parent node end |