class 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) format(MSG, node.inverse_keyword, node.keyword) end
on_until(node)
click to toggle source
# File lib/rubocop/cop/style/negated_while.rb, line 15 def on_until(node) check_negative_conditional(node) end
on_while(node)
click to toggle source
# File lib/rubocop/cop/style/negated_while.rb, line 11 def on_while(node) check_negative_conditional(node) end
Private Instance Methods
autocorrect(node)
click to toggle source
# File lib/rubocop/cop/style/negated_while.rb, line 25 def autocorrect(node) negative_conditional_corrector(node) end