summaryrefslogtreecommitdiff
path: root/rubocop/ext/variable_force.rb
blob: def284513eda6a3b6a1df081357728567d6d95ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module RuboCop
  module Ext
    module VariableForce
      def scanned_node?(node)
        scanned_nodes.include?(node)
      end

      def scanned_nodes
        @scanned_nodes ||= Set.new.compare_by_identity
      end
    end
  end
end

RuboCop::Cop::VariableForce.prepend RuboCop::Ext::VariableForce