class Rubocop::Cop::Style::FavorUnlessOverNegatedIf
Checks for uses of if with a negated condition. Only ifs without else are considered.
Public Instance Methods
error_message()
click to toggle source
# File lib/rubocop/cop/style/favor_unless_over_negated_if.rb, line 34 def error_message 'Favor unless (or control flow or) over if for negative conditions.' end
on_if(node)
click to toggle source
Calls superclass method
# File lib/rubocop/cop/style/favor_unless_over_negated_if.rb, line 29 def on_if(node) check(node) super end