Class: Rubocop::Cop::FavorUntilOverNegatedWhile
- Includes:
- FavorOtherKeywordOverNegation
- Defined in:
- lib/rubocop/cop/favor_unless_over_negated_if.rb
Instance Attribute Summary
Attributes inherited from Cop
Instance Method Summary collapse
Methods inherited from Cop
#add_offence, #has_report?, inherited, #initialize
Constructor Details
This class inherits a constructor from Rubocop::Cop::Cop
Instance Method Details
#error_message ⇒ Object
38 39 40 |
# File 'lib/rubocop/cop/favor_unless_over_negated_if.rb', line 38 def 'Favor until over while for negative conditions.' end |
#inspect(file, source, tokens, sexp) ⇒ Object
42 43 44 |
# File 'lib/rubocop/cop/favor_unless_over_negated_if.rb', line 42 def inspect(file, source, tokens, sexp) [:while, :while_mod].each { |grammar_part| check(grammar_part, sexp) } end |