class LanguageServer::Protocol::Interface::SemanticTokensLegend

Attributes

attributes[R]

Public Class Methods

new(token_types:, token_modifiers:) click to toggle source
# File lib/language_server/protocol/interface/semantic_tokens_legend.rb, line 5
def initialize(token_types:, token_modifiers:)
  @attributes = {}

  @attributes[:tokenTypes] = token_types
  @attributes[:tokenModifiers] = token_modifiers

  @attributes.freeze
end

Public Instance Methods

to_hash() click to toggle source
# File lib/language_server/protocol/interface/semantic_tokens_legend.rb, line 32
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/semantic_tokens_legend.rb, line 36
def to_json(*args)
  to_hash.to_json(*args)
end
token_modifiers() click to toggle source

The token modifiers a server uses.

@return [string

# File lib/language_server/protocol/interface/semantic_tokens_legend.rb, line 26
def token_modifiers
  attributes.fetch(:tokenModifiers)
end
token_types() click to toggle source

The token types a server uses.

@return [string

# File lib/language_server/protocol/interface/semantic_tokens_legend.rb, line 18
def token_types
  attributes.fetch(:tokenTypes)
end