Skip to content

Commit db48c35

Browse files
committed
Merge branch 'master' of github.com:evolve75/RubyTree
2 parents 3858262 + 77c6087 commit db48c35

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ siblings_of_child1 = child1.siblings
103103
# ..... Retrieve immediate children of the root node as an array.
104104
children_of_root = root_node.children
105105

106+
# ..... Retrieve the parent of a node.
107+
parent = child1.parent
108+
106109
# ..... This is a depth-first and L-to-R pre-ordered traversal.
107110
root_node.each { |node| node.content.reverse }
108111

0 commit comments

Comments
 (0)