Parent

Files

Class/Module Index [+]

Quicksearch

RuboCop::Cop::Style::NegatedWhile

Checks for uses of while with a negated condition.

Constants

MSG

Public Instance Methods

message(node) click to toggle source
# File lib/rubocop/cop/style/negated_while.rb, line 19
def message(node)
  if node.type == :while
    format(MSG, 'until', 'while')
  else
    format(MSG, 'while', 'until')
  end
end
on_until(node) click to toggle source
# File lib/rubocop/cop/style/negated_while.rb, line 15
def on_until(node)
  check(node)
end
on_while(node) click to toggle source
# File lib/rubocop/cop/style/negated_while.rb, line 11
def on_while(node)
  check(node)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.