Checks for uses of `do` in multi-line `while/until` statements.
# File lib/rubocop/cop/style/while_until_do.rb, line 15 def handle(node) length = node.loc.expression.source.lines.to_a.size return unless length > 1 return unless node.loc.begin && node.loc.begin.is?('do') add_offense(node, :begin, error_message(node.type)) end
Generated with the Darkfish Rdoc Generator 2.