Class: LanguageServer::Protocol::Interface::SemanticTokensDelta
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::SemanticTokensDelta
- Defined in:
- lib/language_server/protocol/interface/semantic_tokens_delta.rb
Overview
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly
Instance Method Summary collapse
-
#edits ⇒ SemanticTokensEdit[]
The semantic token edits to transform a previous result into a new result.
-
#initialize(result_id: nil, edits:) ⇒ SemanticTokensDelta
constructor
A new instance of SemanticTokensDelta.
- #result_id ⇒ string | nil
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(result_id: nil, edits:) ⇒ SemanticTokensDelta
Returns a new instance of SemanticTokensDelta.
8 9 10 11 12 13 14 15 |
# File 'lib/language_server/protocol/interface/semantic_tokens_delta.rb', line 8 def initialize(result_id: nil, edits:) @attributes = {} @attributes[:resultId] = result_id if result_id @attributes[:edits] = edits @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
30 31 32 |
# File 'lib/language_server/protocol/interface/semantic_tokens_delta.rb', line 30 def attributes @attributes end |
Instance Method Details
#edits ⇒ SemanticTokensEdit[]
The semantic token edits to transform a previous result into a new result.
26 27 28 |
# File 'lib/language_server/protocol/interface/semantic_tokens_delta.rb', line 26 def edits attributes.fetch(:edits) end |
#result_id ⇒ string | nil
18 19 20 |
# File 'lib/language_server/protocol/interface/semantic_tokens_delta.rb', line 18 def result_id attributes.fetch(:resultId) end |
#to_hash ⇒ Object
32 33 34 |
# File 'lib/language_server/protocol/interface/semantic_tokens_delta.rb', line 32 def to_hash attributes end |
#to_json(*args) ⇒ Object
36 37 38 |
# File 'lib/language_server/protocol/interface/semantic_tokens_delta.rb', line 36 def to_json(*args) to_hash.to_json(*args) end |