lib/rubocop/cop/mixin/enforce_superclass.rb in rubocop-1.4.1 vs lib/rubocop/cop/mixin/enforce_superclass.rb in rubocop-1.4.2

- old
+ new

@@ -1,9 +1,17 @@ # frozen_string_literal: true module RuboCop module Cop - # Common functionality for enforcing a specific superclass + # Common functionality for enforcing a specific superclass. + # + # IMPORTANT: RuboCop core depended on this module when it supported Rails department. + # Rails department has been extracted to RuboCop Rails gem. + # This module is deprecated and will be removed by RuboCop 2.0. + # It will not be updated to `RuboCop::Cop::Base` v1 API to maintain compatibility + # with existing RuboCop Rails 2.8 or lower. + # + # @api private module EnforceSuperclass def self.included(base) base.def_node_matcher :class_definition, <<~PATTERN (class (const _ !:#{base::SUPERCLASS}) #{base::BASE_PATTERN} ...) PATTERN