123456789_123456789_123456789_123456789_123456789_

Class: RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment

Relationships & Source Files
Namespace Children
Classes:
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
Inherits: Object
Defined in: lib/rubocop/comment_config.rb

Overview

This class provides an API compatible with RuboCop::DirectiveComment to be used for cops that are disabled in the config file

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(cop_name) ⇒ ConfigDisabledCopDirectiveComment

[ GitHub ]

  
# File 'lib/rubocop/comment_config.rb', line 21

def initialize(cop_name)
  @text = "# rubocop:disable #{cop_name}"
  @line_number = CONFIG_DISABLED_LINE_RANGE_MIN
  @loc = Loc.new(Expression.new(CONFIG_DISABLED_LINE_RANGE_MIN))
end

Instance Attribute Details

#line_number (readonly)

[ GitHub ]

  
# File 'lib/rubocop/comment_config.rb', line 16

attr_reader :text, :loc, :line_number

#loc (readonly)

[ GitHub ]

  
# File 'lib/rubocop/comment_config.rb', line 16

attr_reader :text, :loc, :line_number

#text (readonly)

[ GitHub ]

  
# File 'lib/rubocop/comment_config.rb', line 16

attr_reader :text, :loc, :line_number