From: Dustin Barker Date: 2008-06-12T23:00:58+09:00 Subject: Re: Basic Tree Data Structure Hi Justin, If the tree is ordered, you could provide access the nth node by implementing the [] operator. So for Child 1, could be: subtree = tree[0] subtree.each { |x| put x } -Dustin On Jun 11, 2008, at 5:08 PM, Justin To wrote: > How would I traverse only one portion of the tree? For instance, only > Child 1 and not Child 2? > > So I want to see: > > => "Child 1" > => "Grandchild 1.1" > => "Great Grand Child 1.1.1" > => "Grandchild 1.2" > => "Great Grand Child 1.2.1" > > > Thanks!! > -- > Posted via http://www.ruby-forum.com/. >