Class: RuboCop::MagicComment::SimpleComment
- Inherits:
-
RuboCop::MagicComment
- Object
- RuboCop::MagicComment
- RuboCop::MagicComment::SimpleComment
- Defined in:
- lib/rubocop/magic_comment.rb
Overview
Wrapper for regular magic comments not bound to an editor.
Simple comments can only specify one setting per comment.
Constant Summary
Constants inherited from RuboCop::MagicComment
Instance Method Summary collapse
-
#encoding ⇒ Object
Match ‘encoding` or `coding`.
Methods inherited from RuboCop::MagicComment
#any?, #encoding_specified?, #frozen_string_literal, #frozen_string_literal?, #frozen_string_literal_specified?, #initialize, parse, #valid_literal_value?
Constructor Details
This class inherits a constructor from RuboCop::MagicComment
Instance Method Details
#encoding ⇒ Object
Match ‘encoding` or `coding`
196 197 198 |
# File 'lib/rubocop/magic_comment.rb', line 196 def encoding extract(/\A\s*\#.*\b(?:en)?coding: (#{TOKEN})/i) end |