Class: LanguageServer::Protocol::Interface::TypeHierarchySubtypesParams
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::TypeHierarchySubtypesParams
- Defined in:
- lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb
Overview
The parameter of a typeHierarchy/subtypes request.
Instance Attribute Summary collapse
- #attributes ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(item:, work_done_token: nil, partial_result_token: nil) ⇒ TypeHierarchySubtypesParams
constructor
A new instance of TypeHierarchySubtypesParams.
- #item ⇒ TypeHierarchyItem
-
#partial_result_token ⇒ ProgressToken | nil
An optional token that a server can use to report partial results (e.g. streaming) to the client.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#work_done_token ⇒ ProgressToken | nil
An optional token that a server can use to report work done progress.
Constructor Details
#initialize(item:, work_done_token: nil, partial_result_token: nil) ⇒ TypeHierarchySubtypesParams
Returns a new instance of TypeHierarchySubtypesParams.
10 11 12 13 14 15 16 17 18 |
# File 'lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb', line 10 def initialize(item:, work_done_token: nil, partial_result_token: nil) @attributes = {} @attributes[:item] = item @attributes[:workDoneToken] = work_done_token if work_done_token @attributes[:partialResultToken] = partial_result_token if partial_result_token @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
42 43 44 |
# File 'lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb', line 42 def attributes @attributes end |
Instance Method Details
#item ⇒ TypeHierarchyItem
21 22 23 |
# File 'lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb', line 21 def item attributes.fetch(:item) end |
#partial_result_token ⇒ ProgressToken | nil
An optional token that a server can use to report partial results (e.g. streaming) to the client.
38 39 40 |
# File 'lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb', line 38 def partial_result_token attributes.fetch(:partialResultToken) end |
#to_hash ⇒ Object
44 45 46 |
# File 'lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb', line 44 def to_hash attributes end |
#to_json(*args) ⇒ Object
48 49 50 |
# File 'lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb', line 48 def to_json(*args) to_hash.to_json(*args) end |
#work_done_token ⇒ ProgressToken | nil
An optional token that a server can use to report work done progress.
29 30 31 |
# File 'lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb', line 29 def work_done_token attributes.fetch(:workDoneToken) end |