class LanguageServer::Protocol::Interface::Diagnostic

def code

Returns:
  • (string | number) -
def code
  attributes.fetch(:code)
end

def code_description

Returns:
  • (CodeDescription) -
def code_description
  attributes.fetch(:codeDescription)
end

def data

Returns:
  • (unknown) -
def data
  attributes.fetch(:data)
end

def initialize(range:, severity: nil, code: nil, code_description: nil, source: nil, message:, tags: nil, related_information: nil, data: nil)

def initialize(range:, severity: nil, code: nil, code_description: nil, source: nil, message:, tags: nil, related_information: nil, data: nil)
  @attributes = {}
  @attributes[:range] = range
  @attributes[:severity] = severity if severity
  @attributes[:code] = code if code
  @attributes[:codeDescription] = code_description if code_description
  @attributes[:source] = source if source
  @attributes[:message] = message
  @attributes[:tags] = tags if tags
  @attributes[:relatedInformation] = related_information if related_information
  @attributes[:data] = data if data
  @attributes.freeze
end

def message

Returns:
  • (string) -
def message
  attributes.fetch(:message)
end

def range

Returns:
  • (Range) -
def range
  attributes.fetch(:range)
end

def related_information

Returns:
  • (DiagnosticRelatedInformation[]) -
def related_information
  attributes.fetch(:relatedInformation)
end

def severity

Returns:
  • (DiagnosticSeverity) -
def severity
  attributes.fetch(:severity)
end

def source

Returns:
  • (string) -
def source
  attributes.fetch(:source)
end

def tags

Returns:
  • (DiagnosticTag[]) -
def tags
  attributes.fetch(:tags)
end

def to_hash

def to_hash
  attributes
end

def to_json(*args)

def to_json(*args)
  to_hash.to_json(*args)
end