Class: LanguageServer::Protocol::Interface::InlineValueRegistrationOptions
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::InlineValueRegistrationOptions
- Defined in:
- lib/language_server/protocol/interface/inline_value_registration_options.rb
Overview
Inline value options used during static or dynamic registration.
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.
-
#id ⇒ string
The id used to register the request.
-
#initialize(work_done_progress: nil, document_selector:, id: nil) ⇒ InlineValueRegistrationOptions
constructor
A new instance of InlineValueRegistrationOptions.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
- #work_done_progress ⇒ boolean
Constructor Details
#initialize(work_done_progress: nil, document_selector:, id: nil) ⇒ InlineValueRegistrationOptions
Returns a new instance of InlineValueRegistrationOptions.
8 9 10 11 12 13 14 15 16 |
# File 'lib/language_server/protocol/interface/inline_value_registration_options.rb', line 8 def initialize(work_done_progress: nil, document_selector:, id: nil) @attributes = {} @attributes[:workDoneProgress] = work_done_progress if work_done_progress @attributes[:documentSelector] = document_selector @attributes[:id] = id if id @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
41 42 43 |
# File 'lib/language_server/protocol/interface/inline_value_registration_options.rb', line 41 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.
28 29 30 |
# File 'lib/language_server/protocol/interface/inline_value_registration_options.rb', line 28 def document_selector attributes.fetch(:documentSelector) end |
#id ⇒ string
The id used to register the request. The id can be used to deregister the request again. See also Registration#id.
37 38 39 |
# File 'lib/language_server/protocol/interface/inline_value_registration_options.rb', line 37 def id attributes.fetch(:id) end |
#to_hash ⇒ Object
43 44 45 |
# File 'lib/language_server/protocol/interface/inline_value_registration_options.rb', line 43 def to_hash attributes end |
#to_json(*args) ⇒ Object
47 48 49 |
# File 'lib/language_server/protocol/interface/inline_value_registration_options.rb', line 47 def to_json(*args) to_hash.to_json(*args) end |
#work_done_progress ⇒ boolean
19 20 21 |
# File 'lib/language_server/protocol/interface/inline_value_registration_options.rb', line 19 def work_done_progress attributes.fetch(:workDoneProgress) end |