Class: LSP::StaticRegistrationOptions

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

Overview

export interface StaticRegistrationOptions

/**
 * The id used to register the request. The id can be used to deregister
 * the request again. See also Registration#id.
 */
id?: string;

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ StaticRegistrationOptions

Returns a new instance of StaticRegistrationOptions.



165
166
167
168
# File 'lib/lsp/lsp_protocol.rb', line 165

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

Instance Attribute Details

#idObject

type: string



163
164
165
# File 'lib/lsp/lsp_protocol.rb', line 163

def id
  @id
end

Instance Method Details

#from_h!(value) ⇒ Object



170
171
172
173
174
# File 'lib/lsp/lsp_protocol.rb', line 170

def from_h!(value)
  value = {} if value.nil?
  self.id = value['id']
  self
end