class LanguageServer::Protocol::Interface::AnnotatedTextEdit
A special text edit with an additional change annotation.
Attributes
attributes[R]
Public Class Methods
new(range:, new_text:, annotation_id:)
click to toggle source
# File lib/language_server/protocol/interface/annotated_text_edit.rb, line 8 def initialize(range:, new_text:, annotation_id:) @attributes = {} @attributes[:range] = range @attributes[:newText] = new_text @attributes[:annotationId] = annotation_id @attributes.freeze end
Public Instance Methods
annotation_id()
click to toggle source
The actual annotation identifier.
@return [string]
# File lib/language_server/protocol/interface/annotated_text_edit.rb, line 40 def annotation_id attributes.fetch(:annotationId) end
new_text()
click to toggle source
The string to be inserted. For delete operations use an empty string.
@return [string]
# File lib/language_server/protocol/interface/annotated_text_edit.rb, line 32 def new_text attributes.fetch(:newText) end
range()
click to toggle source
The range of the text document to be manipulated. To insert text into a document create a range where start === end.
@return [Range]
# File lib/language_server/protocol/interface/annotated_text_edit.rb, line 23 def range attributes.fetch(:range) end
to_hash()
click to toggle source
# File lib/language_server/protocol/interface/annotated_text_edit.rb, line 46 def to_hash attributes end
to_json(*args)
click to toggle source
# File lib/language_server/protocol/interface/annotated_text_edit.rb, line 50 def to_json(*args) to_hash.to_json(*args) end