Class: RuboCop::LSP::DisableCommentEdits Private
- Inherits:
-
Object
- Object
- RuboCop::LSP::DisableCommentEdits
- Defined in:
- lib/rubocop/lsp/disable_comment_edits.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Builds LSP text edits for rubocop:disable comments.
Instance Method Summary collapse
- #edits ⇒ Object private
-
#initialize(offense:, document_encoding:, processed_source:) ⇒ DisableCommentEdits
constructor
private
A new instance of DisableCommentEdits.
Constructor Details
#initialize(offense:, document_encoding:, processed_source:) ⇒ DisableCommentEdits
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of DisableCommentEdits.
8 9 10 11 12 |
# File 'lib/rubocop/lsp/disable_comment_edits.rb', line 8 def initialize(offense:, document_encoding:, processed_source:) @offense = offense @document_encoding = document_encoding @processed_source = processed_source end |
Instance Method Details
#edits ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 17 18 19 |
# File 'lib/rubocop/lsp/disable_comment_edits.rb', line 14 def edits literal_range = multiline_literal_range return block_disable_comments(literal_range) if literal_range inline_disable_comment end |