Class: LanguageServer::Protocol::Interface::DocumentColorRegistrationOptions
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::DocumentColorRegistrationOptions
- Defined in:
- lib/language_server/protocol/interface/document_color_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.
-
#id ⇒ string
The id used to register the request.
-
#initialize(document_selector:, id: nil, work_done_progress: nil) ⇒ DocumentColorRegistrationOptions
constructor
A new instance of DocumentColorRegistrationOptions.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
- #work_done_progress ⇒ boolean
Constructor Details
#initialize(document_selector:, id: nil, work_done_progress: nil) ⇒ DocumentColorRegistrationOptions
Returns a new instance of DocumentColorRegistrationOptions.
5 6 7 8 9 10 11 12 13 |
# File 'lib/language_server/protocol/interface/document_color_registration_options.rb', line 5 def initialize(document_selector:, id: nil, work_done_progress: nil) @attributes = {} @attributes[:documentSelector] = document_selector @attributes[:id] = id if id @attributes[:workDoneProgress] = work_done_progress if work_done_progress @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
38 39 40 |
# File 'lib/language_server/protocol/interface/document_color_registration_options.rb', line 38 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_color_registration_options.rb', line 20 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.
29 30 31 |
# File 'lib/language_server/protocol/interface/document_color_registration_options.rb', line 29 def id attributes.fetch(:id) end |
#to_hash ⇒ Object
40 41 42 |
# File 'lib/language_server/protocol/interface/document_color_registration_options.rb', line 40 def to_hash attributes end |
#to_json(*args) ⇒ Object
44 45 46 |
# File 'lib/language_server/protocol/interface/document_color_registration_options.rb', line 44 def to_json(*args) to_hash.to_json(*args) end |
#work_done_progress ⇒ boolean
34 35 36 |
# File 'lib/language_server/protocol/interface/document_color_registration_options.rb', line 34 def work_done_progress attributes.fetch(:workDoneProgress) end |