Class: LanguageServer::Protocol::Interface::SemanticTokensEdit
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::SemanticTokensEdit
- Defined in:
- lib/language_server/protocol/interface/semantic_tokens_edit.rb
Overview
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly
Instance Method Summary collapse
-
#data ⇒ uinteger[] | nil
The elements to insert.
-
#delete_count ⇒ uinteger
The count of elements to remove.
-
#initialize(start:, delete_count:, data: nil) ⇒ SemanticTokensEdit
constructor
A new instance of SemanticTokensEdit.
-
#start ⇒ uinteger
The start offset of the edit.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(start:, delete_count:, data: nil) ⇒ SemanticTokensEdit
Returns a new instance of SemanticTokensEdit.
8 9 10 11 12 13 14 15 16 |
# File 'lib/language_server/protocol/interface/semantic_tokens_edit.rb', line 8 def initialize(start:, delete_count:, data: nil) @attributes = {} @attributes[:start] = start @attributes[:deleteCount] = delete_count @attributes[:data] = data if data @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
42 43 44 |
# File 'lib/language_server/protocol/interface/semantic_tokens_edit.rb', line 42 def attributes @attributes end |
Instance Method Details
#data ⇒ uinteger[] | nil
The elements to insert.
38 39 40 |
# File 'lib/language_server/protocol/interface/semantic_tokens_edit.rb', line 38 def data attributes.fetch(:data) end |
#delete_count ⇒ uinteger
The count of elements to remove.
30 31 32 |
# File 'lib/language_server/protocol/interface/semantic_tokens_edit.rb', line 30 def delete_count attributes.fetch(:deleteCount) end |
#start ⇒ uinteger
The start offset of the edit.
22 23 24 |
# File 'lib/language_server/protocol/interface/semantic_tokens_edit.rb', line 22 def start attributes.fetch(:start) end |
#to_hash ⇒ Object
44 45 46 |
# File 'lib/language_server/protocol/interface/semantic_tokens_edit.rb', line 44 def to_hash attributes end |
#to_json(*args) ⇒ Object
48 49 50 |
# File 'lib/language_server/protocol/interface/semantic_tokens_edit.rb', line 48 def to_json(*args) to_hash.to_json(*args) end |