Class: LanguageServer::Protocol::Interface::DocumentLinkRegistrationOptions
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::DocumentLinkRegistrationOptions
- Defined in:
- lib/language_server/protocol/interface/document_link_registration_options.rb
Overview
Registration options for a [DocumentLinkRequest](#DocumentLinkRequest).
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#document_selector ⇒ DocumentSelector | null
A document selector to identify the scope of the registration.
-
#initialize(document_selector:, resolve_provider: nil, work_done_progress: nil) ⇒ DocumentLinkRegistrationOptions
constructor
A new instance of DocumentLinkRegistrationOptions.
-
#resolve_provider ⇒ boolean | nil
Document links have a resolve provider as well.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
- #work_done_progress ⇒ boolean | nil
Constructor Details
#initialize(document_selector:, resolve_provider: nil, work_done_progress: nil) ⇒ DocumentLinkRegistrationOptions
Returns a new instance of DocumentLinkRegistrationOptions.
8 9 10 11 12 13 14 15 16 |
# File 'lib/language_server/protocol/interface/document_link_registration_options.rb', line 8 def initialize(document_selector:, resolve_provider: nil, work_done_progress: nil) @attributes = {} @attributes[:documentSelector] = document_selector @attributes[:resolveProvider] = resolve_provider if resolve_provider @attributes[:workDoneProgress] = work_done_progress if work_done_progress @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
40 41 42 |
# File 'lib/language_server/protocol/interface/document_link_registration_options.rb', line 40 def attributes @attributes end |
Instance Method Details
#document_selector ⇒ DocumentSelector | null
A document selector to identify the scope of the registration. If set to null the document selector provided on the client side will be used.
23 24 25 |
# File 'lib/language_server/protocol/interface/document_link_registration_options.rb', line 23 def document_selector attributes.fetch(:documentSelector) end |
#resolve_provider ⇒ boolean | nil
Document links have a resolve provider as well.
31 32 33 |
# File 'lib/language_server/protocol/interface/document_link_registration_options.rb', line 31 def resolve_provider attributes.fetch(:resolveProvider) end |
#to_hash ⇒ Object
42 43 44 |
# File 'lib/language_server/protocol/interface/document_link_registration_options.rb', line 42 def to_hash attributes end |
#to_json(*args) ⇒ Object
46 47 48 |
# File 'lib/language_server/protocol/interface/document_link_registration_options.rb', line 46 def to_json(*args) to_hash.to_json(*args) end |
#work_done_progress ⇒ boolean | nil
36 37 38 |
# File 'lib/language_server/protocol/interface/document_link_registration_options.rb', line 36 def work_done_progress attributes.fetch(:workDoneProgress) end |