Class: LanguageServer::Protocol::Interface::FullDocumentDiagnosticReport

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

Overview

A diagnostic report with a full set of problems.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind:, result_id: nil, items:) ⇒ FullDocumentDiagnosticReport

Returns a new instance of FullDocumentDiagnosticReport.



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

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

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

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



44
45
46
# File 'lib/language_server/protocol/interface/full_document_diagnostic_report.rb', line 44

def attributes
  @attributes
end

Instance Method Details

#itemsDiagnostic[]

The actual items.

Returns:



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

def items
  attributes.fetch(:items)
end

#kindany

A full document diagnostic report.

Returns:

  • (any)


22
23
24
# File 'lib/language_server/protocol/interface/full_document_diagnostic_report.rb', line 22

def kind
  attributes.fetch(:kind)
end

#result_idstring

An optional result id. If provided it will be sent on the next diagnostic request for the same document.

Returns:

  • (string)


32
33
34
# File 'lib/language_server/protocol/interface/full_document_diagnostic_report.rb', line 32

def result_id
  attributes.fetch(:resultId)
end

#to_hashObject



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

def to_hash
  attributes
end

#to_json(*args) ⇒ Object



50
51
52
# File 'lib/language_server/protocol/interface/full_document_diagnostic_report.rb', line 50

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