Class: LanguageServer::Protocol::Interface::DefinitionClientCapabilities
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::DefinitionClientCapabilities
- Defined in:
- lib/language_server/protocol/interface/definition_client_capabilities.rb
Overview
Client Capabilities for a [DefinitionRequest](#DefinitionRequest).
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#dynamic_registration ⇒ boolean | nil
Whether definition supports dynamic registration.
-
#initialize(dynamic_registration: nil, link_support: nil) ⇒ DefinitionClientCapabilities
constructor
A new instance of DefinitionClientCapabilities.
-
#link_support ⇒ boolean | nil
The client supports additional metadata in the form of definition links.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(dynamic_registration: nil, link_support: nil) ⇒ DefinitionClientCapabilities
Returns a new instance of DefinitionClientCapabilities.
8 9 10 11 12 13 14 15 |
# File 'lib/language_server/protocol/interface/definition_client_capabilities.rb', line 8 def initialize(dynamic_registration: nil, link_support: nil) @attributes = {} @attributes[:dynamicRegistration] = dynamic_registration if dynamic_registration @attributes[:linkSupport] = link_support if link_support @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
35 36 37 |
# File 'lib/language_server/protocol/interface/definition_client_capabilities.rb', line 35 def attributes @attributes end |
Instance Method Details
#dynamic_registration ⇒ boolean | nil
Whether definition supports dynamic registration.
21 22 23 |
# File 'lib/language_server/protocol/interface/definition_client_capabilities.rb', line 21 def dynamic_registration attributes.fetch(:dynamicRegistration) end |
#link_support ⇒ boolean | nil
The client supports additional metadata in the form of definition links.
31 32 33 |
# File 'lib/language_server/protocol/interface/definition_client_capabilities.rb', line 31 def link_support attributes.fetch(:linkSupport) end |
#to_hash ⇒ Object
37 38 39 |
# File 'lib/language_server/protocol/interface/definition_client_capabilities.rb', line 37 def to_hash attributes end |
#to_json(*args) ⇒ Object
41 42 43 |
# File 'lib/language_server/protocol/interface/definition_client_capabilities.rb', line 41 def to_json(*args) to_hash.to_json(*args) end |