class LanguageServer::Protocol::Interface::CallHierarchyItem

Attributes

attributes[R]

Public Class Methods

new(name:, kind:, tags: nil, detail: nil, uri:, range:, selection_range:, data: nil) click to toggle source
# 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] = tags if tags
  @attributes[:detail] = detail if detail
  @attributes[:uri] = uri
  @attributes[:range] = range
  @attributes[:selectionRange] = selection_range
  @attributes[:data] = data if data

  @attributes.freeze
end

Public Instance Methods

data() click to toggle source

A data entry field that is preserved between a call hierarchy prepare and incoming calls or outgoing calls requests.

@return [unknown]

# File lib/language_server/protocol/interface/call_hierarchy_item.rb, line 84
def data
  attributes.fetch(:data)
end
detail() click to toggle source

More detail for this item, e.g. the signature of a function.

@return [string]

# File lib/language_server/protocol/interface/call_hierarchy_item.rb, line 48
def detail
  attributes.fetch(:detail)
end
kind() click to toggle source

The kind of this item.

@return [any]

# File lib/language_server/protocol/interface/call_hierarchy_item.rb, line 32
def kind
  attributes.fetch(:kind)
end
name() click to toggle source

The name of this item.

@return [string]

# File lib/language_server/protocol/interface/call_hierarchy_item.rb, line 24
def name
  attributes.fetch(:name)
end
range() click to toggle source

The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.

@return [Range]

# File lib/language_server/protocol/interface/call_hierarchy_item.rb, line 65
def range
  attributes.fetch(:range)
end
selection_range() click to toggle source

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).

@return [Range]

# File lib/language_server/protocol/interface/call_hierarchy_item.rb, line 75
def selection_range
  attributes.fetch(:selectionRange)
end
tags() click to toggle source

Tags for this item.

@return [1

# File lib/language_server/protocol/interface/call_hierarchy_item.rb, line 40
def tags
  attributes.fetch(:tags)
end
to_hash() click to toggle source
# File lib/language_server/protocol/interface/call_hierarchy_item.rb, line 90
def to_hash
  attributes
end
to_json(*args) click to toggle source
# File lib/language_server/protocol/interface/call_hierarchy_item.rb, line 94
def to_json(*args)
  to_hash.to_json(*args)
end
uri() click to toggle source

The resource identifier of this item.

@return [string]

# File lib/language_server/protocol/interface/call_hierarchy_item.rb, line 56
def uri
  attributes.fetch(:uri)
end