Class: LanguageServer::Protocol::Interface::PublishDiagnosticsClientCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::PublishDiagnosticsClientCapabilities
- Defined in:
- lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(related_information: nil, tag_support: nil, version_support: nil) ⇒ PublishDiagnosticsClientCapabilities
constructor
A new instance of PublishDiagnosticsClientCapabilities.
-
#related_information ⇒ boolean
Whether the clients accepts diagnostics with related information.
-
#tag_support ⇒ { valueSet: DiagnosticTag[]; }
Client supports the tag property to provide meta data about a diagnostic.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#version_support ⇒ boolean
Whether the client interprets the version property of the ‘textDocument/publishDiagnostics` notification’s parameter.
Constructor Details
#initialize(related_information: nil, tag_support: nil, version_support: nil) ⇒ PublishDiagnosticsClientCapabilities
Returns a new instance of PublishDiagnosticsClientCapabilities.
5 6 7 8 9 10 11 12 13 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 5 def initialize(related_information: nil, tag_support: nil, version_support: nil) @attributes = {} @attributes[:relatedInformation] = if @attributes[:tagSupport] = tag_support if tag_support @attributes[:versionSupport] = version_support if version_support @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
41 42 43 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 41 def attributes @attributes end |
Instance Method Details
#related_information ⇒ boolean
Whether the clients accepts diagnostics with related information.
19 20 21 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 19 def attributes.fetch(:relatedInformation) end |
#tag_support ⇒ { valueSet: DiagnosticTag[]; }
Client supports the tag property to provide meta data about a diagnostic. Clients supporting tags have to handle unknown tags gracefully.
28 29 30 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 28 def tag_support attributes.fetch(:tagSupport) end |
#to_hash ⇒ Object
43 44 45 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 43 def to_hash attributes end |
#to_json(*args) ⇒ Object
47 48 49 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 47 def to_json(*args) to_hash.to_json(*args) end |
#version_support ⇒ boolean
Whether the client interprets the version property of the ‘textDocument/publishDiagnostics` notification’s parameter.
37 38 39 |
# File 'lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb', line 37 def version_support attributes.fetch(:versionSupport) end |