Class: LSP::DidSaveTextDocumentParams

Inherits:
LSPBase
  • Object
show all
Defined in:
lib/lsp/lsp_protocol.rb

Overview

export interface DidSaveTextDocumentParams

/**
 * The document that was closed.
 */
textDocument: VersionedTextDocumentIdentifier;
/**
 * Optional the content when saved. Depends on the includeText value
 * when the save notification was requested.
 */
text?: string;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ DidSaveTextDocumentParams

Returns a new instance of DidSaveTextDocumentParams.



637
638
639
640
# File 'lib/lsp/lsp_protocol.rb', line 637

def initialize(initial_hash = nil)
  super
  @optional_method_names = i[text]
end

Instance Attribute Details

#textObject

type: VersionedTextDocumentIdentifier # type: string



635
636
637
# File 'lib/lsp/lsp_protocol.rb', line 635

def text
  @text
end

#textDocumentObject

type: VersionedTextDocumentIdentifier # type: string



635
636
637
# File 'lib/lsp/lsp_protocol.rb', line 635

def textDocument
  @textDocument
end

Instance Method Details

#from_h!(value) ⇒ Object



642
643
644
645
646
647
# File 'lib/lsp/lsp_protocol.rb', line 642

def from_h!(value)
  value = {} if value.nil?
  self.textDocument = value['textDocument'] # Unknown type
  self.text = value['text']
  self
end