Class: RuboCop::Cop::Lint::Obscure
- Inherits:
-
RuboCop::Cop
- Object
- RuboCop::Cop
- RuboCop::Cop::Lint::Obscure
- Defined in:
- lib/rubocop/cop/lint/obscure.rb
Overview
Constant Summary collapse
- MSG =
"Do not use the flipflop operator"
Instance Method Summary collapse
Instance Method Details
#on_eflipflop(node) ⇒ Object
33 34 35 |
# File 'lib/rubocop/cop/lint/obscure.rb', line 33 def on_eflipflop(node) add_offense(node) end |
#on_iflipflop(node) ⇒ Object
29 30 31 |
# File 'lib/rubocop/cop/lint/obscure.rb', line 29 def on_iflipflop(node) add_offense(node) end |
#on_send(node) ⇒ Object
37 38 39 40 41 |
# File 'lib/rubocop/cop/lint/obscure.rb', line 37 def on_send(node) return unless is_stringformat?(node) add_offense(node, message: "Do not use String#%") end |