class RuboCop::AST::OpAsgnNode
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 ‘op_asgn` nodes.
def assignment_node
-
(AsgnNode)
- the assignment node
def assignment_node node_parts[0] end
def expression
-
(Node)
- the expression being assigned.
def expression node_parts.last end
def name
-
(Symbol)
- the name of the variable being assigned
def name assignment_node.name end
def operator
-
(Symbol)
- the assignment operator
def operator node_parts[1] end