Method: RuboCop::AST::ForNode#do?

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

#do?Boolean

Checks whether the ‘for` node has a `do` keyword.

Returns:

  • (Boolean)

    whether the ‘for` node has a `do` keyword



19
20
21
# File 'lib/rubocop/ast/node/for_node.rb', line 19

def do?
  loc.begin && loc.begin.is?('do')
end