Class: RuboCop::Cop::Rails::Inquiry
- Inherits:
-
RuboCop::Cop
- Object
- RuboCop::Cop
- RuboCop::Cop::Rails::Inquiry
- Defined in:
- lib/rubocop/cop/rails/inquiry.rb
Overview
This cop checks that Active Support’s ‘inquiry` method is not used.
Constant Summary collapse
- MSG =
"Prefer Ruby's comparison operators over Active Support's `inquiry`."
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
28 29 30 |
# File 'lib/rubocop/cop/rails/inquiry.rb', line 28 def on_send(node) add_offense(node, location: :selector) if node.method?(:inquiry) && node.arguments.empty? end |