Class: LanguageServer::Protocol::Interface::WorkspaceFullDocumentDiagnosticReport
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::WorkspaceFullDocumentDiagnosticReport
- Defined in:
- lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb
Overview
A full document diagnostic report for a workspace diagnostic result.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(kind:, result_id: nil, items:, uri:, version:) ⇒ WorkspaceFullDocumentDiagnosticReport
constructor
A new instance of WorkspaceFullDocumentDiagnosticReport.
-
#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
-
#uri ⇒ string
The URI for which diagnostic information is reported.
-
#version ⇒ number
The version number for which the diagnostics are reported.
Constructor Details
#initialize(kind:, result_id: nil, items:, uri:, version:) ⇒ WorkspaceFullDocumentDiagnosticReport
Returns a new instance of WorkspaceFullDocumentDiagnosticReport.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb', line 8 def initialize(kind:, result_id: nil, items:, uri:, version:) @attributes = {} @attributes[:kind] = kind @attributes[:resultId] = result_id if result_id @attributes[:items] = items @attributes[:uri] = uri @attributes[:version] = version @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
63 64 65 |
# File 'lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb', line 63 def attributes @attributes end |
Instance Method Details
#items ⇒ Diagnostic[]
The actual items.
42 43 44 |
# File 'lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb', line 42 def items attributes.fetch(:items) end |
#kind ⇒ any
A full document diagnostic report.
24 25 26 |
# File 'lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb', line 24 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.
34 35 36 |
# File 'lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb', line 34 def result_id attributes.fetch(:resultId) end |
#to_hash ⇒ Object
65 66 67 |
# File 'lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb', line 65 def to_hash attributes end |
#to_json(*args) ⇒ Object
69 70 71 |
# File 'lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb', line 69 def to_json(*args) to_hash.to_json(*args) end |
#uri ⇒ string
The URI for which diagnostic information is reported.
50 51 52 |
# File 'lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb', line 50 def uri attributes.fetch(:uri) end |
#version ⇒ number
The version number for which the diagnostics are reported. If the document is not marked as open ‘null` can be provided.
59 60 61 |
# File 'lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb', line 59 def version attributes.fetch(:version) end |