Class: LanguageServer::Protocol::Interface::SemanticTokensDelta
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::SemanticTokensDelta
- Defined in:
- lib/language_server/protocol/interface/semantic_tokens_delta.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
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
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(result_id: nil, edits:) ⇒ SemanticTokensDelta
Returns a new instance of SemanticTokensDelta.
5 6 7 8 9 10 11 12 |
# File 'lib/language_server/protocol/interface/semantic_tokens_delta.rb', line 5 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)
Returns the value of attribute attributes.
28 29 30 |
# File 'lib/language_server/protocol/interface/semantic_tokens_delta.rb', line 28 def attributes @attributes end |
Instance Method Details
#edits ⇒ SemanticTokensEdit[]
The semantic token edits to transform a previous result into a new result.
24 25 26 |
# File 'lib/language_server/protocol/interface/semantic_tokens_delta.rb', line 24 def edits attributes.fetch(:edits) end |
#result_id ⇒ string
15 16 17 |
# File 'lib/language_server/protocol/interface/semantic_tokens_delta.rb', line 15 def result_id attributes.fetch(:resultId) end |
#to_hash ⇒ Object
30 31 32 |
# File 'lib/language_server/protocol/interface/semantic_tokens_delta.rb', line 30 def to_hash attributes end |
#to_json(*args) ⇒ Object
34 35 36 |
# File 'lib/language_server/protocol/interface/semantic_tokens_delta.rb', line 34 def to_json(*args) to_hash.to_json(*args) end |