class RuboCop::AST::ClassNode

to all ‘class` nodes within RuboCop.
node when the builder constructs the AST, making its methods available
A node extension for `class` nodes. This will be used in place of a plain

def body

Returns:
  • (Node, nil) - the body of the class
def body
  node_parts[2]
end

def identifier

Returns:
  • (Node) - the identifier of the class
def identifier
  node_parts[0]
end

def parent_class

Returns:
  • (Node, nil) - the parent class of the class
def parent_class
  node_parts[1]
end