lib/rubocop/cop/in_batches.rb in gitlab-styles-8.0.0 vs lib/rubocop/cop/in_batches.rb in gitlab-styles-9.0.0
- old
+ new
@@ -3,16 +3,16 @@
require_relative '../../gitlab/styles/rubocop/model_helpers'
module Rubocop
module Cop
# Cop that prevents the use of `in_batches`
- class InBatches < RuboCop::Cop::Cop
+ class InBatches < RuboCop::Cop::Base
MSG = 'Do not use `in_batches`, use `each_batch` from the EachBatch module instead'
def on_send(node)
return unless node.children[1] == :in_batches
- add_offense(node, location: :selector)
+ add_offense(node.loc.selector)
end
end
end
end