class LanguageServer::Protocol::Interface::Registration
General parameters to register for a capability.
Attributes
attributes[R]
Public Class Methods
new(id:, method:, register_options: nil)
click to toggle source
# File lib/language_server/protocol/interface/registration.rb, line 8 def initialize(id:, method:, register_options: nil) @attributes = {} @attributes[:id] = id @attributes[:method] = method @attributes[:registerOptions] = register_options if register_options @attributes.freeze end
Public Instance Methods
id()
click to toggle source
The id used to register the request. The id can be used to deregister the request again.
@return [string]
# File lib/language_server/protocol/interface/registration.rb, line 23 def id attributes.fetch(:id) end
method()
click to toggle source
The method / capability to register for.
@return [string]
# File lib/language_server/protocol/interface/registration.rb, line 31 def method attributes.fetch(:method) end
register_options()
click to toggle source
Options necessary for the registration.
@return [any]
# File lib/language_server/protocol/interface/registration.rb, line 39 def register_options attributes.fetch(:registerOptions) end
to_hash()
click to toggle source
# File lib/language_server/protocol/interface/registration.rb, line 45 def to_hash attributes end
to_json(*args)
click to toggle source
# File lib/language_server/protocol/interface/registration.rb, line 49 def to_json(*args) to_hash.to_json(*args) end