Skip to content

Commit

Permalink
Merge pull request #53 from Intrepidd/patch-1
Browse files Browse the repository at this point in the history
Add parent method to README
  • Loading branch information
evolve75 committed Jan 1, 2016
2 parents 851498e + f187fd6 commit 77c6087
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -103,6 +103,9 @@ siblings_of_child1 = child1.siblings
# ..... Retrieve immediate children of the root node as an array.
children_of_root = root_node.children

# ..... Retrieve the parent of a node.
parent = child1.parent

# ..... This is a depth-first and L-to-R pre-ordered traversal.
root_node.each { |node| node.content.reverse }

Expand Down

0 comments on commit 77c6087

Please sign in to comment.