class RuboCop::AST::CasgnNode

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

def expression

Returns:
  • (Node) - the expression being assigned.
def expression
  node_parts[2]
end

def name

Returns:
  • (Symbol) - the name of the variable being assigned
def name
  node_parts[1]
end

def namespace

Returns:
  • (Node, nil) - the node associated with the scope (e.g. cbase, const, ...)
def namespace
  node_parts[0]
end