Class: LanguageServer::Protocol::Interface::CallHierarchyOutgoingCall
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::CallHierarchyOutgoingCall
- Defined in:
- lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb,
sig/language_server/protocol/interface/call_hierarchy_outgoing_call.rbs
Overview
Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.
Instance Attribute Summary collapse
- #attributes ⇒ Hash[Symbol, untyped] readonly
Instance Method Summary collapse
-
#from_ranges ⇒ Range[]
The range at which this item is called.
-
#initialize(to:, from_ranges:) ⇒ CallHierarchyOutgoingCall
constructor
A new instance of CallHierarchyOutgoingCall.
-
#to ⇒ CallHierarchyItem
The item that is called.
- #to_hash ⇒ Hash[Symbol, untyped]
- #to_json(*args) ⇒ String
Constructor Details
#initialize(to:, from_ranges:) ⇒ CallHierarchyOutgoingCall
Returns a new instance of CallHierarchyOutgoingCall.
10 11 12 13 14 15 16 17 |
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb', line 10 def initialize(to:, from_ranges:) @attributes = {} @attributes[:to] = to @attributes[:fromRanges] = from_ranges @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Hash[Symbol, untyped] (readonly)
37 38 39 |
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb', line 37 def attributes @attributes end |
Instance Method Details
#from_ranges ⇒ Range[]
The range at which this item is called. This is the range relative to the caller, e.g the item passed to CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls `provideCallHierarchyOutgoingCalls` and not CallHierarchyOutgoingCall.to `this.to`.
33 34 35 |
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb', line 33 def from_ranges attributes.fetch(:fromRanges) end |
#to ⇒ CallHierarchyItem
The item that is called.
23 24 25 |
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb', line 23 def to attributes.fetch(:to) end |
#to_hash ⇒ Hash[Symbol, untyped]
39 40 41 |
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb', line 39 def to_hash attributes end |
#to_json(*args) ⇒ String
43 44 45 |
# File 'lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb', line 43 def to_json(*args) to_hash.to_json(*args) end |