Class: Gitlab::Styles::Rubocop::Cop::InBatches
- Inherits:
-
RuboCop::Cop::Cop
- Object
- RuboCop::Cop::Cop
- Gitlab::Styles::Rubocop::Cop::InBatches
- Defined in:
- lib/gitlab/styles/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'
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
13 14 15 16 17 |
# File 'lib/gitlab/styles/rubocop/cop/in_batches.rb', line 13 def on_send(node) return unless node.children[1] == :in_batches add_offense(node, location: :selector) end |