Class: LSP::VersionedTextDocumentIdentifier

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

Overview

export interface VersionedTextDocumentIdentifier extends TextDocumentIdentifier

/**
 * The version number of this document. If a versioned text document identifier
 * is sent from the server to the client and the file is not open in the editor
 * (the server has not received an open notification before) the server can send
 * `null` to indicate that the version is unknown and the content on disk is the
 * truth (as speced with document content ownership).
 */
version: number | null;

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

#uriObject

type: number | null # type: DocumentUri



685
686
687
# File 'lib/lsp/lsp_types.rb', line 685

def uri
  @uri
end

#versionObject

type: number | null # type: DocumentUri



685
686
687
# File 'lib/lsp/lsp_types.rb', line 685

def version
  @version
end

Instance Method Details

#from_h!(value) ⇒ Object



687
688
689
690
691
692
# File 'lib/lsp/lsp_types.rb', line 687

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