Class: LanguageServer::Protocol::Interface::CallHierarchyIncomingCall

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from:, from_ranges:) ⇒ CallHierarchyIncomingCall

Returns a new instance of CallHierarchyIncomingCall.



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

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

  @attributes[:from] = from
  @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_incoming_call.rb', line 31

def attributes
  @attributes
end

Instance Method Details

#fromCallHierarchyItem

The item that makes the call.

Returns:



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

def from
  attributes.fetch(:from)
end

#from_rangesRange[]

The ranges at which the calls appear. This is relative to the caller denoted by [‘this.from`](#CallHierarchyIncomingCall.from).

Returns:



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

def from_ranges
  attributes.fetch(:fromRanges)
end

#to_hashObject



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

def to_hash
  attributes
end

#to_json(*args) ⇒ Object



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

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