Class: LanguageServer::Protocol::Interface::DocumentLinkRegistrationOptions
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::DocumentLinkRegistrationOptions
- Defined in:
- lib/language_server/protocol/interface/document_link_registration_options.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#document_selector ⇒ DocumentSelector
A document selector to identify the scope of the registration.
-
#initialize(document_selector:, work_done_progress: nil, resolve_provider: nil) ⇒ DocumentLinkRegistrationOptions
constructor
A new instance of DocumentLinkRegistrationOptions.
-
#resolve_provider ⇒ boolean
Document links have a resolve provider as well.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
- #work_done_progress ⇒ boolean
Constructor Details
#initialize(document_selector:, work_done_progress: nil, resolve_provider: nil) ⇒ DocumentLinkRegistrationOptions
Returns a new instance of DocumentLinkRegistrationOptions.
5 6 7 8 9 10 11 12 13 |
# File 'lib/language_server/protocol/interface/document_link_registration_options.rb', line 5 def initialize(document_selector:, work_done_progress: nil, resolve_provider: nil) @attributes = {} @attributes[:documentSelector] = document_selector @attributes[:workDoneProgress] = work_done_progress if work_done_progress @attributes[:resolveProvider] = resolve_provider if resolve_provider @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
37 38 39 |
# File 'lib/language_server/protocol/interface/document_link_registration_options.rb', line 37 def attributes @attributes end |
Instance Method Details
#document_selector ⇒ DocumentSelector
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.
20 21 22 |
# File 'lib/language_server/protocol/interface/document_link_registration_options.rb', line 20 def document_selector attributes.fetch(:documentSelector) end |
#resolve_provider ⇒ boolean
Document links have a resolve provider as well.
33 34 35 |
# File 'lib/language_server/protocol/interface/document_link_registration_options.rb', line 33 def resolve_provider attributes.fetch(:resolveProvider) end |
#to_hash ⇒ Object
39 40 41 |
# File 'lib/language_server/protocol/interface/document_link_registration_options.rb', line 39 def to_hash attributes end |
#to_json(*args) ⇒ Object
43 44 45 |
# File 'lib/language_server/protocol/interface/document_link_registration_options.rb', line 43 def to_json(*args) to_hash.to_json(*args) end |
#work_done_progress ⇒ boolean
25 26 27 |
# File 'lib/language_server/protocol/interface/document_link_registration_options.rb', line 25 def work_done_progress attributes.fetch(:workDoneProgress) end |