Class: LanguageServer::Protocol::Interface::CallHierarchyOutgoingCall

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(to:, from_ranges:) ⇒ CallHierarchyOutgoingCall

Returns a new instance of CallHierarchyOutgoingCall.



5
6
7
8
9
10
11
12
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb', line 5

def initialize(to:, from_ranges:)
  @attributes = {}

  @attributes[:to] = to
  @attributes[:fromRanges] = from_ranges

  @attributes.freeze
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



31
32
33
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb', line 31

def attributes
  @attributes
end

Instance Method Details

#from_rangesRange[]

The range at which this item is called. This is the range relative to the caller, e.g the item passed to ‘callHierarchy/outgoingCalls` request.

Returns:



27
28
29
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb', line 27

def from_ranges
  attributes.fetch(:fromRanges)
end

#toCallHierarchyItem

The item that is called.

Returns:



18
19
20
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb', line 18

def to
  attributes.fetch(:to)
end

#to_hashObject



33
34
35
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb', line 33

def to_hash
  attributes
end

#to_json(*args) ⇒ Object



37
38
39
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb', line 37

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