Class: LanguageServer::Protocol::Interface::CallHierarchyItem
- Inherits:
-
Object
- Object
- LanguageServer::Protocol::Interface::CallHierarchyItem
- Defined in:
- lib/language_server/protocol/interface/call_hierarchy_item.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#data ⇒ unknown
A data entry field that is preserved between a call hierarchy prepare and incoming calls or outgoing calls requests.
-
#detail ⇒ string
More detail for this item, e.g.
-
#initialize(name:, kind:, tags: nil, detail: nil, uri:, range:, selection_range:, data: nil) ⇒ CallHierarchyItem
constructor
A new instance of CallHierarchyItem.
-
#kind ⇒ SymbolKind
The kind of this item.
-
#name ⇒ string
The name of this item.
-
#range ⇒ Range
The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g.
-
#selection_range ⇒ Range
The range that should be selected and revealed when this symbol is being picked, e.g.
-
#tags ⇒ 1[]
Tags for this item.
- #to_hash ⇒ Object
- #to_json(*args) ⇒ Object
-
#uri ⇒ string
The resource identifier of this item.
Constructor Details
#initialize(name:, kind:, tags: nil, detail: nil, uri:, range:, selection_range:, data: nil) ⇒ CallHierarchyItem
Returns a new instance of CallHierarchyItem.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/language_server/protocol/interface/call_hierarchy_item.rb', line 5 def initialize(name:, kind:, tags: nil, detail: nil, uri:, range:, selection_range:, data: nil) @attributes = {} @attributes[:name] = name @attributes[:kind] = kind @attributes[:tags] = if @attributes[:detail] = detail if detail @attributes[:uri] = uri @attributes[:range] = range @attributes[:selectionRange] = selection_range @attributes[:data] = data if data @attributes.freeze end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
88 89 90 |
# File 'lib/language_server/protocol/interface/call_hierarchy_item.rb', line 88 def attributes @attributes end |
Instance Method Details
#data ⇒ unknown
A data entry field that is preserved between a call hierarchy prepare and incoming calls or outgoing calls requests.
84 85 86 |
# File 'lib/language_server/protocol/interface/call_hierarchy_item.rb', line 84 def data attributes.fetch(:data) end |
#detail ⇒ string
More detail for this item, e.g. the signature of a function.
48 49 50 |
# File 'lib/language_server/protocol/interface/call_hierarchy_item.rb', line 48 def detail attributes.fetch(:detail) end |
#kind ⇒ SymbolKind
The kind of this item.
32 33 34 |
# File 'lib/language_server/protocol/interface/call_hierarchy_item.rb', line 32 def kind attributes.fetch(:kind) end |
#name ⇒ string
The name of this item.
24 25 26 |
# File 'lib/language_server/protocol/interface/call_hierarchy_item.rb', line 24 def name attributes.fetch(:name) end |
#range ⇒ Range
The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.
65 66 67 |
# File 'lib/language_server/protocol/interface/call_hierarchy_item.rb', line 65 def range attributes.fetch(:range) end |
#selection_range ⇒ Range
The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function. Must be contained by the [‘range`](#CallHierarchyItem.range).
75 76 77 |
# File 'lib/language_server/protocol/interface/call_hierarchy_item.rb', line 75 def selection_range attributes.fetch(:selectionRange) end |
#tags ⇒ 1[]
Tags for this item.
40 41 42 |
# File 'lib/language_server/protocol/interface/call_hierarchy_item.rb', line 40 def attributes.fetch(:tags) end |
#to_hash ⇒ Object
90 91 92 |
# File 'lib/language_server/protocol/interface/call_hierarchy_item.rb', line 90 def to_hash attributes end |
#to_json(*args) ⇒ Object
94 95 96 |
# File 'lib/language_server/protocol/interface/call_hierarchy_item.rb', line 94 def to_json(*args) to_hash.to_json(*args) end |
#uri ⇒ string
The resource identifier of this item.
56 57 58 |
# File 'lib/language_server/protocol/interface/call_hierarchy_item.rb', line 56 def uri attributes.fetch(:uri) end |