Class: LanguageServer::Protocol::Interface::WorkspaceUnchangedDocumentDiagnosticReport

Inherits:
Object
  • Object
show all
Defined in:
lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb

Overview

An unchanged document diagnostic report for a workspace diagnostic result.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind:, result_id:, uri:, version:) ⇒ WorkspaceUnchangedDocumentDiagnosticReport

Returns a new instance of WorkspaceUnchangedDocumentDiagnosticReport.



8
9
10
11
12
13
14
15
16
17
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 8

def initialize(kind:, result_id:, uri:, version:)
  @attributes = {}

  @attributes[:kind] = kind
  @attributes[:resultId] = result_id
  @attributes[:uri] = uri
  @attributes[:version] = version

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



56
57
58
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 56

def attributes
  @attributes
end

Instance Method Details

#kindany

A document diagnostic report indicating no changes to the last result. A server can only return ‘unchanged` if result ids are provided.

Returns:

  • (any)


26
27
28
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 26

def kind
  attributes.fetch(:kind)
end

#result_idstring

A result id which will be sent on the next diagnostic request for the same document.

Returns:

  • (string)


35
36
37
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 35

def result_id
  attributes.fetch(:resultId)
end

#to_hashObject



58
59
60
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 58

def to_hash
  attributes
end

#to_json(*args) ⇒ Object



62
63
64
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 62

def to_json(*args)
  to_hash.to_json(*args)
end

#uristring

The URI for which diagnostic information is reported.

Returns:

  • (string)


43
44
45
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 43

def uri
  attributes.fetch(:uri)
end

#versionnumber

The version number for which the diagnostics are reported. If the document is not marked as open ‘null` can be provided.

Returns:

  • (number)


52
53
54
# File 'lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb', line 52

def version
  attributes.fetch(:version)
end