Class: RuboCop::MagicComment::EmacsComment

Inherits:
EditorComment show all
Defined in:
lib/rubocop/magic_comment.rb

Overview

Wrapper for Emacs style magic comments.

Examples:

Emacs style comment

comment = RuboCop::MagicComment.parse(
  '# -*- encoding: ASCII-8BIT -*-'
)

comment.encoding # => 'ascii-8bit'

See Also:

Constant Summary collapse

REGEXP =
/-\*-(?<token>.+)-\*-/.freeze
FORMAT =
'# -*- %s -*-'
SEPARATOR =
';'
OPERATOR =
':'

Constants inherited from RuboCop::MagicComment

KEYWORDS, TOKEN

Method Summary

Methods inherited from EditorComment

#encoding, #without

Methods inherited from RuboCop::MagicComment

#any?, #encoding_specified?, #frozen_string_literal, #frozen_string_literal?, #frozen_string_literal_specified?, #initialize, parse, #shareable_constant_value, #shareable_constant_value_specified?, #typed, #typed_specified?, #valid?, #valid_literal_value?, #valid_shareable_constant_value?

Constructor Details

This class inherits a constructor from RuboCop::MagicComment