lib/rubocop/cop/without_reactive_cache.rb in gitlab-styles-8.0.0 vs lib/rubocop/cop/without_reactive_cache.rb in gitlab-styles-9.0.0
- old
+ new
@@ -1,16 +1,16 @@
# frozen_string_literal: true
module Rubocop
module Cop
# Cop that prevents the use of `without_reactive_cache`
- class WithoutReactiveCache < RuboCop::Cop::Cop
+ class WithoutReactiveCache < RuboCop::Cop::Base
MSG = 'without_reactive_cache is for debugging purposes only. Please use with_reactive_cache.'
def on_send(node)
return unless node.children[1] == :without_reactive_cache
- add_offense(node, location: :selector)
+ add_offense(node.loc.selector)
end
end
end
end