class RuboCop::AST::Node

def ancestors

Returns:
  • (Array) - an array of ancestor nodes
def ancestors
  each_ancestor.to_a
end