Class: LanguageServer::Protocol::Interface::PublishDiagnosticsParams
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::PublishDiagnosticsParams
- Defined in:
- lib/language_server/protocol/interface/publish_diagnostics_params.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#diagnostics ⇒ Diagnostic[]
An array of diagnostic information items.
-
#initialize(uri:, diagnostics:) ⇒ PublishDiagnosticsParams
constructor
A new instance of PublishDiagnosticsParams.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#uri ⇒ string
The URI for which diagnostic information is reported.
Constructor Details
#initialize(uri:, diagnostics:) ⇒ PublishDiagnosticsParams
Returns a new instance of PublishDiagnosticsParams.
5 6 7 8 9 10 11 12 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_params.rb', line 5 def initialize(uri:, diagnostics:) @attributes = {} @attributes[:uri] = uri @attributes[:diagnostics] = diagnostics @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
30 31 32 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_params.rb', line 30 def attributes @attributes end |
Instance Method Details
#diagnostics ⇒ Diagnostic[]
An array of diagnostic information items.
26 27 28 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_params.rb', line 26 def diagnostics attributes.fetch(:diagnostics) end |
#to_hash ⇒ Object
32 33 34 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_params.rb', line 32 def to_hash attributes end |
#to_json(*args) ⇒ Object
36 37 38 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_params.rb', line 36 def to_json(*args) to_hash.to_json(*args) end |
#uri ⇒ string
The URI for which diagnostic information is reported.
18 19 20 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_params.rb', line 18 def uri attributes.fetch(:uri) end |