Method: RuboCop::AST::ForNode#variable

Defined in:
lib/rubocop/ast/node/for_node.rb

#variableNode

Returns the iteration variable of the ‘for` loop.

Returns:

  • (Node)

    The iteration variable of the ‘for` loop



34
35
36
# File 'lib/rubocop/ast/node/for_node.rb', line 34

def variable
  node_parts[0]
end