Method: Tree::TreeNode#right_siblings

Defined in:
lib/evoc/tree/tree_node.rb

#right_siblingsObject

Returns the right siblings of the current node.

Returns:

  • the right siblings of the current node



8
9
10
11
12
13
14
# 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