class RuboCop::AST::ClassNode
A node extension for `class` nodes. This will be used in place of a plain node when the builder constructs the AST
, making its methods available to all `class` nodes within RuboCop
.
Public Instance Methods
body()
click to toggle source
The body of this `class` node.
@return [Node, nil] the body of the class
# File lib/rubocop/ast/node/class_node.rb, line 26 def body node_parts[2] end
identifier()
click to toggle source
The identifer for this `class` node.
@return [Node] the identifer of the class
# File lib/rubocop/ast/node/class_node.rb, line 12 def identifier node_parts[0] end
parent_class()
click to toggle source
The parent class for this `class` node.
@return [Node, nil] the parent class of the class
# File lib/rubocop/ast/node/class_node.rb, line 19 def parent_class node_parts[1] end