Class: LanguageServer::Protocol::Interface::SemanticTokensPartialResult

Inherits:
Object
  • Object
show all
Defined in:
lib/language_server/protocol/interface/semantic_tokens_partial_result.rb

Overview

Since:

  • 3.16.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:) ⇒ SemanticTokensPartialResult

Returns a new instance of SemanticTokensPartialResult.

Since:

  • 3.16.0



8
9
10
11
12
13
14
# File 'lib/language_server/protocol/interface/semantic_tokens_partial_result.rb', line 8

def initialize(data:)
  @attributes = {}

  @attributes[:data] = data

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Since:

  • 3.16.0



21
22
23
# File 'lib/language_server/protocol/interface/semantic_tokens_partial_result.rb', line 21

def attributes
  @attributes
end

Instance Method Details

#datauinteger[]

Returns:

  • (uinteger[])

Since:

  • 3.16.0



17
18
19
# File 'lib/language_server/protocol/interface/semantic_tokens_partial_result.rb', line 17

def data
  attributes.fetch(:data)
end

#to_hashObject

Since:

  • 3.16.0



23
24
25
# File 'lib/language_server/protocol/interface/semantic_tokens_partial_result.rb', line 23

def to_hash
  attributes
end

#to_json(*args) ⇒ Object

Since:

  • 3.16.0



27
28
29
# File 'lib/language_server/protocol/interface/semantic_tokens_partial_result.rb', line 27

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