Class: LanguageServer::Protocol::Interface::CallHierarchyOutgoingCallsParams

Inherits:
Object
  • Object
show all
Defined in:
lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb

Overview

The parameter of a callHierarchy/outgoingCalls request.

Since:

  • 3.16.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of CallHierarchyOutgoingCallsParams.

Since:

  • 3.16.0



10
11
12
13
14
15
16
17
18
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_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

#attributesObject (readonly)

Since:

  • 3.16.0



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

def attributes
  @attributes
end

Instance Method Details

#itemCallHierarchyItem

Returns:

Since:

  • 3.16.0



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

def item
  attributes.fetch(:item)
end

#partial_result_tokenProgressToken | nil

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

Returns:

  • (ProgressToken | nil)

Since:

  • 3.16.0



38
39
40
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb', line 38

def partial_result_token
  attributes.fetch(:partialResultToken)
end

#to_hashObject

Since:

  • 3.16.0



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

def to_hash
  attributes
end

#to_json(*args) ⇒ Object

Since:

  • 3.16.0



48
49
50
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb', line 48

def to_json(*args)
  to_hash.to_json(*args)
end

#work_done_tokenProgressToken | nil

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

Returns:

  • (ProgressToken | nil)

Since:

  • 3.16.0



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

def work_done_token
  attributes.fetch(:workDoneToken)
end