Class: Rubocop::Cop::InBatches
- Inherits:
-
RuboCop::Cop::Base
- Object
- RuboCop::Cop::Base
- Rubocop::Cop::InBatches
- Defined in:
- lib/rubocop/cop/in_batches.rb
Overview
Cop that prevents the use of ‘in_batches`
Constant Summary collapse
- MSG =
'Do not use `in_batches`, use `each_batch` from the EachBatch module instead'
- RESTRICT_ON_SEND =
%i[in_batches].freeze
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
11 12 13 |
# File 'lib/rubocop/cop/in_batches.rb', line 11 def on_send(node) add_offense(node.loc.selector) end |