class LanguageServer::Protocol::Interface::VersionedTextDocumentIdentifier

Attributes

attributes[R]

Public Class Methods

new(uri:, version:) click to toggle source
# File lib/language_server/protocol/interface/versioned_text_document_identifier.rb, line 5
def initialize(uri:, version:)
  @attributes = {}

  @attributes[:uri] = uri
  @attributes[:version] = version

  @attributes.freeze
end

Public Instance Methods

to_hash() click to toggle source
# File lib/language_server/protocol/interface/versioned_text_document_identifier.rb, line 35
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/versioned_text_document_identifier.rb, line 39
def to_json(*args)
  to_hash.to_json(*args)
end
uri() click to toggle source

The text document's URI.

@return [string]

# File lib/language_server/protocol/interface/versioned_text_document_identifier.rb, line 18
def uri
  attributes.fetch(:uri)
end
version() click to toggle source

The version number of this document.

The version number of a document will increase after each change, including undo/redo. The number doesn't need to be consecutive.

@return [number]

# File lib/language_server/protocol/interface/versioned_text_document_identifier.rb, line 29
def version
  attributes.fetch(:version)
end