class Tree::TreeNode
Public Instance Methods
left_siblings()
click to toggle source
@return the left siblings of the current node
# File lib/evoc/tree/tree_node.rb, line 18 def left_siblings if self.is_first_sibling? return [] else return [self.previous_sibling] + self.previous_sibling.left_siblings end end
right_siblings()
click to toggle source
@return the right siblings of the current node
# File lib/evoc/tree/tree_node.rb, line 8 def right_siblings if self.is_last_sibling? return [] else return [self.next_sibling] + self.next_sibling.right_siblings end end