class LanguageServer::Protocol::Interface::DiagnosticRelatedInformation

Represents a related message and source code location for a diagnostic. This should be used to point to code locations that cause or are related to a diagnostics, e.g when duplicating a symbol in a scope.

Attributes

attributes[R]

Public Class Methods

new(location:, message:) click to toggle source
# File lib/language_server/protocol/interface/diagnostic_related_information.rb, line 10
def initialize(location:, message:)
  @attributes = {}

  @attributes[:location] = location
  @attributes[:message] = message

  @attributes.freeze
end

Public Instance Methods

location() click to toggle source

The location of this related diagnostic information.

@return [Location]

# File lib/language_server/protocol/interface/diagnostic_related_information.rb, line 23
def location
  attributes.fetch(:location)
end
message() click to toggle source

The message of this related diagnostic information.

@return [string]

# File lib/language_server/protocol/interface/diagnostic_related_information.rb, line 31
def message
  attributes.fetch(:message)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/diagnostic_related_information.rb, line 37
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/diagnostic_related_information.rb, line 41
def to_json(*args)
  to_hash.to_json(*args)
end