class Rubocop::Cop::Style::WhileUntilModifier
if written as a modifier while/until.
Checks for while and until statements that would fit on one line
def inspect(source_buffer, source, tokens, ast, comments)
def inspect(source_buffer, source, tokens, ast, comments) return unless ast on_node([:while, :until], ast) do |node| # discard modifier while/until next unless node.loc.end if check(node, comments) add_offence(:convention, node.loc.expression, MSG) end end end