Class: LSP::TextDocumentEdit

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

Overview

export interface TextDocumentEdit

/**
 * The text document to change.
 */
textDocument: VersionedTextDocumentIdentifier;
/**
 * The edits to be applied.
 */
edits: TextEdit[];

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#initialize, #to_h, #to_json

Constructor Details

This class inherits a constructor from LSP::LSPBase

Instance Attribute Details

#editsObject

type: VersionedTextDocumentIdentifier # type: TextEdit[]



391
392
393
# File 'lib/lsp/lsp_types.rb', line 391

def edits
  @edits
end

#textDocumentObject

type: VersionedTextDocumentIdentifier # type: TextEdit[]



391
392
393
# File 'lib/lsp/lsp_types.rb', line 391

def textDocument
  @textDocument
end

Instance Method Details

#from_h!(value) ⇒ Object



393
394
395
396
397
398
# File 'lib/lsp/lsp_types.rb', line 393

def from_h!(value)
  value = {} if value.nil?
  self.textDocument = VersionedTextDocumentIdentifier.new(value['textDocument']) unless value['textDocument'].nil?
  self.edits = to_typed_aray(value['edits'], TextEdit)
  self
end