Class: LSP::Registration
Overview
export interface Registration
/**
* The id used to register the request. The id can be used to deregister
* the request again.
*/
id: string;
/**
* The method to register for.
*/
method: string;
/**
* Options necessary for the registration.
*/
registerOptions?: any;
Instance Attribute Summary collapse
-
#id ⇒ Object
type: string # type: string # type: any.
-
#method__lsp ⇒ Object
type: string # type: string # type: any.
-
#registerOptions ⇒ Object
type: string # type: string # type: any.
Instance Method Summary collapse
- #from_h!(value) ⇒ Object
-
#initialize(initial_hash = nil) ⇒ Registration
constructor
A new instance of Registration.
Methods inherited from LSPBase
Constructor Details
#initialize(initial_hash = nil) ⇒ Registration
Returns a new instance of Registration.
29 30 31 32 |
# File 'lib/lsp/lsp_protocol.rb', line 29 def initialize(initial_hash = nil) super @optional_method_names = %i[registerOptions] end |
Instance Attribute Details
#id ⇒ Object
type: string # type: string # type: any
27 28 29 |
# File 'lib/lsp/lsp_protocol.rb', line 27 def id @id end |
#method__lsp ⇒ Object
type: string # type: string # type: any
27 28 29 |
# File 'lib/lsp/lsp_protocol.rb', line 27 def method__lsp @method__lsp end |
#registerOptions ⇒ Object
type: string # type: string # type: any
27 28 29 |
# File 'lib/lsp/lsp_protocol.rb', line 27 def registerOptions @registerOptions end |
Instance Method Details
#from_h!(value) ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/lsp/lsp_protocol.rb', line 34 def from_h!(value) value = {} if value.nil? self.id = value['id'] self.method__lsp = value['method'] self.registerOptions = value['registerOptions'] self end |