Class: LSP::PublishDiagnosticsParams
- Defined in:
- lib/lsp/lsp_protocol.rb
Overview
export interface PublishDiagnosticsParams
/**
* The URI for which diagnostic information is reported.
*/
uri: DocumentUri;
/**
* Optional the version number of the document the diagnostics are published for.
*
* @since 3.15.0
*/
version?: number;
/**
* An array of diagnostic information items.
*/
diagnostics: Diagnostic[];
Instance Attribute Summary collapse
-
#diagnostics ⇒ Object
type: DocumentUri # type: number # type: Diagnostic[].
-
#uri ⇒ Object
type: DocumentUri # type: number # type: Diagnostic[].
-
#version ⇒ Object
type: DocumentUri # type: number # type: Diagnostic[].
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ PublishDiagnosticsParams
constructor
A new instance of PublishDiagnosticsParams.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ PublishDiagnosticsParams
Returns a new instance of PublishDiagnosticsParams.
866 867 868 869 |
# File 'lib/lsp/lsp_protocol.rb', line 866 def initialize(initial_hash = nil) super @optional_method_names = %i[version] end |
Instance Attribute Details
#diagnostics ⇒ Object
type: DocumentUri # type: number # type: Diagnostic[]
864 865 866 |
# File 'lib/lsp/lsp_protocol.rb', line 864 def diagnostics @diagnostics end |
#uri ⇒ Object
type: DocumentUri # type: number # type: Diagnostic[]
864 865 866 |
# File 'lib/lsp/lsp_protocol.rb', line 864 def uri @uri end |
#version ⇒ Object
type: DocumentUri # type: number # type: Diagnostic[]
864 865 866 |
# File 'lib/lsp/lsp_protocol.rb', line 864 def version @version end |
Instance Method Details
#from_h!(value) ⇒ Object
871 872 873 874 875 876 877 |
# File 'lib/lsp/lsp_protocol.rb', line 871 def from_h!(value) value = {} if value.nil? self.uri = value['uri'] # Unknown type self.version = value['version'] self.diagnostics = value['diagnostics'].map { |val| val } unless value['diagnostics'].nil? # Unknown array type self end |