Class: RuboCop::MagicComment::EditorComment Abstract
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Subclasses:
|
|
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
MagicComment
|
|
|
Instance Chain:
self,
MagicComment
|
|
| Inherits: |
MagicComment
|
| Defined in: | lib/rubocop/magic_comment.rb |
Overview
This class is abstract.
Parent to Vim and Emacs magic comment handling.
Instance Method Summary
- #encoding
-
#without(type)
Rewrite the comment without a given token type.
-
#match(keyword) ⇒ String?
private
Find a token starting with the provided keyword and extract its value.
-
#tokens ⇒ Array<String>
private
Individual tokens composing an editor specific comment string.
Instance Method Details
#encoding
[ GitHub ]#match(keyword) ⇒ String? (private)
Find a token starting with the provided keyword and extract its value.
#tokens ⇒ Array<String> (private)
Individual tokens composing an editor specific comment string.
# File 'lib/rubocop/magic_comment.rb', line 184
def tokens extract(self.class::REGEXP).split(self.class::SEPARATOR).map(&:strip) end
#without(type)
Rewrite the comment without a given token type