Class: RuboCop::CommentConfig::ConfigDisabledCopDirectiveComment
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Instance Chain:
self,
::RuboCop::Ext::Comment
|
|
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
- #line_number readonly
- #loc readonly
- #text readonly
Instance Method Summary
::RuboCop::Ext::Comment
- Included
Constructor Details
.new(cop_name) ⇒ ConfigDisabledCopDirectiveComment
# 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 ]#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