class LanguageServer::Protocol::Interface::DidSaveTextDocumentParams

Attributes

attributes[R]

Public Class Methods

new(text_document:, text: nil) click to toggle source
# File lib/language_server/protocol/interface/did_save_text_document_params.rb, line 5
def initialize(text_document:, text: nil)
  @attributes = {}

  @attributes[:textDocument] = text_document
  @attributes[:text] = text if text

  @attributes.freeze
end

Public Instance Methods

text() click to toggle source

Optional the content when saved. Depends on the includeText value when the save notification was requested.

@return [string]

# File lib/language_server/protocol/interface/did_save_text_document_params.rb, line 27
def text
  attributes.fetch(:text)
end
text_document() click to toggle source

The document that was saved.

@return [TextDocumentIdentifier]

# File lib/language_server/protocol/interface/did_save_text_document_params.rb, line 18
def text_document
  attributes.fetch(:textDocument)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/did_save_text_document_params.rb, line 33
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/did_save_text_document_params.rb, line 37
def to_json(*args)
  to_hash.to_json(*args)
end