Class: Rubocop::Cop::Style::CaseEquality
- Defined in:
- lib/rubocop/cop/style/case_equality.rb
Overview
This cop checks for uses of the case equality operator(===).
Constant Summary collapse
- MSG =
'Avoid the use of the case equality operator(===).'
Constants inherited from Cop
Instance Attribute Summary
Attributes inherited from Cop
#config, #corrections, #offences, #processed_source
Instance Method Summary collapse
Methods inherited from Cop
#add_offence, all, #autocorrect?, #convention, #cop_config, cop_name, #cop_name, cop_type, #debug?, #ignore_node, inherited, #initialize, lint?, #message, non_rails, rails?, style?, #support_autocorrect?, #warning
Constructor Details
This class inherits a constructor from Rubocop::Cop::Cop
Instance Method Details
#on_send(node) ⇒ Object
10 11 12 13 14 |
# File 'lib/rubocop/cop/style/case_equality.rb', line 10 def on_send(node) _receiver, method_name, *_args = *node convention(node, :selector) if method_name == :=== end |