class LanguageServer::Protocol::Interface::PublishDiagnosticsParams
Attributes
attributes[R]
Public Class Methods
new(uri:, version: nil, diagnostics:)
click to toggle source
# File lib/language_server/protocol/interface/publish_diagnostics_params.rb, line 5 def initialize(uri:, version: nil, diagnostics:) @attributes = {} @attributes[:uri] = uri @attributes[:version] = version if version @attributes[:diagnostics] = diagnostics @attributes.freeze end
Public Instance Methods
diagnostics()
click to toggle source
An array of diagnostic information items.
@return [Diagnostic
# File lib/language_server/protocol/interface/publish_diagnostics_params.rb, line 36 def diagnostics attributes.fetch(:diagnostics) end
to_hash()
click to toggle source
# File lib/language_server/protocol/interface/publish_diagnostics_params.rb, line 42 def to_hash attributes end
to_json(*args)
click to toggle source
# File lib/language_server/protocol/interface/publish_diagnostics_params.rb, line 46 def to_json(*args) to_hash.to_json(*args) end
uri()
click to toggle source
The URI for which diagnostic information is reported.
@return [string]
# File lib/language_server/protocol/interface/publish_diagnostics_params.rb, line 19 def uri attributes.fetch(:uri) end
version()
click to toggle source
Optional the version number of the document the diagnostics are published for.
@return [number]
# File lib/language_server/protocol/interface/publish_diagnostics_params.rb, line 28 def version attributes.fetch(:version) end