Class: LanguageServer::Protocol::Interface::TypeHierarchySubtypesParams

Inherits:
Object
  • Object
show all
Defined in:
lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb,
sig/language_server/protocol/interface/type_hierarchy_subtypes_params.rbs

Overview

The parameter of a typeHierarchy/subtypes request.

Since:

  • 3.17.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(item:, work_done_token: nil, partial_result_token: nil) ⇒ TypeHierarchySubtypesParams

Returns a new instance of TypeHierarchySubtypesParams.

Parameters:

  • item: (Object)
  • work_done_token: (Object) (defaults to: nil)
  • partial_result_token: (Object) (defaults to: nil)

Since:

  • 3.17.0



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

#attributesHash[Symbol, untyped] (readonly)

Returns:

  • (Hash[Symbol, untyped])

Since:

  • 3.17.0



42
43
44
# File 'lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb', line 42

def attributes
  @attributes
end

Instance Method Details

#itemTypeHierarchyItem

Returns:

Since:

  • 3.17.0



21
22
23
# File 'lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb', line 21

def item
  attributes.fetch(:item)
end

#partial_result_tokenProgressToken

An optional token that a server can use to report partial results (e.g. streaming) to the client.

Returns:

  • (ProgressToken)

Since:

  • 3.17.0



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_hashHash[Symbol, untyped]

Returns:

  • (Hash[Symbol, untyped])

Since:

  • 3.17.0



44
45
46
# File 'lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb', line 44

def to_hash
  attributes
end

#to_json(*args) ⇒ String

Parameters:

  • (Object)

Returns:

  • (String)

Since:

  • 3.17.0



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_tokenProgressToken

An optional token that a server can use to report work done progress.

Returns:

  • (ProgressToken)

Since:

  • 3.17.0



29
30
31
# File 'lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb', line 29

def work_done_token
  attributes.fetch(:workDoneToken)
end