Class: LanguageServer::Protocol::Interface::UnchangedDocumentDiagnosticReport

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

Overview

A diagnostic report indicating that the last returned report is still accurate.

Since:

  • 3.17.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind:, result_id:) ⇒ UnchangedDocumentDiagnosticReport

Returns a new instance of UnchangedDocumentDiagnosticReport.

Since:

  • 3.17.0



11
12
13
14
15
16
17
18
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 11

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

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

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Since:

  • 3.17.0



40
41
42
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 40

def attributes
  @attributes
end

Instance Method Details

#kind"unchanged"

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

Since:

  • 3.17.0



27
28
29
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 27

def kind
  attributes.fetch(:kind)
end

#result_idstring

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

Since:

  • 3.17.0



36
37
38
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 36

def result_id
  attributes.fetch(:resultId)
end

#to_hashObject

Since:

  • 3.17.0



42
43
44
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 42

def to_hash
  attributes
end

#to_json(*args) ⇒ Object

Since:

  • 3.17.0



46
47
48
# File 'lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb', line 46

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