Class: LanguageServer::Protocol::Interface::Unregistration
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::Unregistration
- Defined in:
- lib/language_server/protocol/interface/unregistration.rb
Overview
General parameters to unregister a capability.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#id ⇒ string
The id used to unregister the request or notification.
-
#initialize(id:, method:) ⇒ Unregistration
constructor
A new instance of Unregistration.
-
#method ⇒ string
The method / capability to unregister for.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(id:, method:) ⇒ Unregistration
Returns a new instance of Unregistration.
8 9 10 11 12 13 14 15 |
# File 'lib/language_server/protocol/interface/unregistration.rb', line 8 def initialize(id:, method:) @attributes = {} @attributes[:id] = id @attributes[:method] = method @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
34 35 36 |
# File 'lib/language_server/protocol/interface/unregistration.rb', line 34 def attributes @attributes end |
Instance Method Details
#id ⇒ string
The id used to unregister the request or notification. Usually an id provided during the register request.
22 23 24 |
# File 'lib/language_server/protocol/interface/unregistration.rb', line 22 def id attributes.fetch(:id) end |
#method ⇒ string
The method / capability to unregister for.
30 31 32 |
# File 'lib/language_server/protocol/interface/unregistration.rb', line 30 def method attributes.fetch(:method) end |
#to_hash ⇒ Object
36 37 38 |
# File 'lib/language_server/protocol/interface/unregistration.rb', line 36 def to_hash attributes end |
#to_json(*args) ⇒ Object
40 41 42 |
# File 'lib/language_server/protocol/interface/unregistration.rb', line 40 def to_json(*args) to_hash.to_json(*args) end |