lib/rubocop/comment_config.rb in rubocop-1.65.1 vs lib/rubocop/comment_config.rb in rubocop-1.66.0

- old
+ new

@@ -2,12 +2,10 @@ module RuboCop # This class parses the special `rubocop:disable` comments in a source # and provides a way to check if each cop is enabled at arbitrary line. class CommentConfig - extend Forwardable - CONFIG_DISABLED_LINE_RANGE_MIN = -Float::INFINITY # This class provides an API compatible with RuboCop::DirectiveComment # to be used for cops that are disabled in the config file class ConfigDisabledCopDirectiveComment @@ -27,14 +25,20 @@ CopAnalysis = Struct.new(:line_ranges, :start_line_number) attr_reader :processed_source - def_delegators :@processed_source, :config, :registry - def initialize(processed_source) @processed_source = processed_source @no_directives = !processed_source.raw_source.include?('rubocop') + end + + def config + @processed_source.config + end + + def registry + @processed_source.registry end def cop_enabled_at_line?(cop, line_number) cop = cop.cop_name if cop.respond_to?(:cop_name) disabled_line_ranges = cop_disabled_line_ranges[cop]