lib/rubocop/cop/rails/read_write_attribute.rb in rubocop-0.50.0 vs lib/rubocop/cop/rails/read_write_attribute.rb in rubocop-0.51.0

- old
+ new

@@ -18,18 +18,18 @@ class ReadWriteAttribute < Cop MSG = 'Prefer `%s` over `%s`.'.freeze def_node_matcher :read_write_attribute?, <<-PATTERN { - (send nil :read_attribute _) - (send nil :write_attribute _ _) + (send nil? :read_attribute _) + (send nil? :write_attribute _ _) } PATTERN def on_send(node) return unless read_write_attribute?(node) - add_offense(node, :selector) + add_offense(node, location: :selector) end private def message(node)