Class: LanguageServer::Protocol::Interface::SemanticTokensEdit
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::SemanticTokensEdit
- Defined in:
- lib/language_server/protocol/interface/semantic_tokens_edit.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#data ⇒ number[]
The elements to insert.
-
#delete_count ⇒ number
The count of elements to remove.
-
#initialize(start:, delete_count:, data: nil) ⇒ SemanticTokensEdit
constructor
A new instance of SemanticTokensEdit.
-
#start ⇒ number
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.
5 6 7 8 9 10 11 12 13 |
# File 'lib/language_server/protocol/interface/semantic_tokens_edit.rb', line 5 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)
Returns the value of attribute attributes.
39 40 41 |
# File 'lib/language_server/protocol/interface/semantic_tokens_edit.rb', line 39 def attributes @attributes end |
Instance Method Details
#data ⇒ number[]
The elements to insert.
35 36 37 |
# File 'lib/language_server/protocol/interface/semantic_tokens_edit.rb', line 35 def data attributes.fetch(:data) end |
#delete_count ⇒ number
The count of elements to remove.
27 28 29 |
# File 'lib/language_server/protocol/interface/semantic_tokens_edit.rb', line 27 def delete_count attributes.fetch(:deleteCount) end |
#start ⇒ number
The start offset of the edit.
19 20 21 |
# File 'lib/language_server/protocol/interface/semantic_tokens_edit.rb', line 19 def start attributes.fetch(:start) end |
#to_hash ⇒ Object
41 42 43 |
# File 'lib/language_server/protocol/interface/semantic_tokens_edit.rb', line 41 def to_hash attributes end |
#to_json(*args) ⇒ Object
45 46 47 |
# File 'lib/language_server/protocol/interface/semantic_tokens_edit.rb', line 45 def to_json(*args) to_hash.to_json(*args) end |