Class: LanguageServer::Protocol::Interface::FullDocumentDiagnosticReport
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::FullDocumentDiagnosticReport
- 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
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(kind:, result_id: nil, items:) ⇒ FullDocumentDiagnosticReport
constructor
A new instance of FullDocumentDiagnosticReport.
-
#items ⇒ Diagnostic[]
The actual items.
-
#kind ⇒ any
A full document diagnostic report.
-
#result_id ⇒ string
An optional result id.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
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
#attributes ⇒ Object (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
#items ⇒ Diagnostic[]
The actual items.
40 41 42 |
# File 'lib/language_server/protocol/interface/full_document_diagnostic_report.rb', line 40 def items attributes.fetch(:items) end |
#kind ⇒ any
A full document diagnostic report.
22 23 24 |
# File 'lib/language_server/protocol/interface/full_document_diagnostic_report.rb', line 22 def kind attributes.fetch(:kind) end |
#result_id ⇒ string
An optional result id. If provided it will be sent on the next diagnostic request for the same document.
32 33 34 |
# File 'lib/language_server/protocol/interface/full_document_diagnostic_report.rb', line 32 def result_id attributes.fetch(:resultId) end |
#to_hash ⇒ Object
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 |