Class: LSP::SemanticTokensEdit

Inherits:
LSPBase
  • Object
show all
Defined in:
lib/lsp/lsp_protocol_sematictokens.proposed.rb

Overview

export interface SemanticTokensEdit

start: number;
deleteCount: number;
data?: number[];

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ SemanticTokensEdit



82
83
84
85
# File 'lib/lsp/lsp_protocol_sematictokens.proposed.rb', line 82

def initialize(initial_hash = nil)
  super
  @optional_method_names = i[data]
end

Instance Attribute Details

#dataObject

type: number # type: number # type: number[]



80
81
82
# File 'lib/lsp/lsp_protocol_sematictokens.proposed.rb', line 80

def data
  @data
end

#deleteCountObject

type: number # type: number # type: number[]



80
81
82
# File 'lib/lsp/lsp_protocol_sematictokens.proposed.rb', line 80

def deleteCount
  @deleteCount
end

#startObject

type: number # type: number # type: number[]



80
81
82
# File 'lib/lsp/lsp_protocol_sematictokens.proposed.rb', line 80

def start
  @start
end

Instance Method Details

#from_h!(value) ⇒ Object



87
88
89
90
91
92
93
# File 'lib/lsp/lsp_protocol_sematictokens.proposed.rb', line 87

def from_h!(value)
  value = {} if value.nil?
  self.start = value['start']
  self.deleteCount = value['deleteCount']
  self.data = value['data'].map { |val| val } unless value['data'].nil?
  self
end