Class: RuboCop::MagicComment::EmacsComment
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
EditorComment,
MagicComment
|
|
|
Instance Chain:
self,
EditorComment,
MagicComment
|
|
| Inherits: |
RuboCop::MagicComment::EditorComment
|
| Defined in: | lib/rubocop/magic_comment.rb |
Overview
Wrapper for Emacs style magic comments.
Constant Summary
-
FORMAT =
# File 'lib/rubocop/magic_comment.rb', line 202'# -*- %s -*-' -
OPERATOR =
# File 'lib/rubocop/magic_comment.rb', line 204':' -
REGEXP =
# File 'lib/rubocop/magic_comment.rb', line 201/-\*-(?<token>.+)-\*-/.freeze
-
SEPARATOR =
# File 'lib/rubocop/magic_comment.rb', line 203';'
Instance Method Summary
- #new_frozen_string_literal(value)
- #extract_frozen_string_literal private
-
#extract_rbs_inline_value
private
Emacs comments cannot specify RBS::inline behavior.
- #extract_shareable_constant_value private
-
#extract_typed
private
Emacs comments cannot specify Sorbet typechecking behavior.
EditorComment - Inherited
Instance Method Details
#extract_frozen_string_literal (private)
[ GitHub ]# File 'lib/rubocop/magic_comment.rb', line 212
def extract_frozen_string_literal match(KEYWORDS[:frozen_string_literal]) end
#extract_rbs_inline_value (private)
Emacs comments cannot specify RBS::inline behavior.
# File 'lib/rubocop/magic_comment.rb', line 217
def extract_rbs_inline_value; end
#extract_typed (private)
Emacs comments cannot specify Sorbet typechecking behavior.
# File 'lib/rubocop/magic_comment.rb', line 224
def extract_typed; end
#new_frozen_string_literal(value)
[ GitHub ]# File 'lib/rubocop/magic_comment.rb', line 206
def new_frozen_string_literal(value) "# -*- frozen_string_literal: #{value} -*-" end