Class: RubyIndexer::Index::Entry::Alias

Inherits:
RubyIndexer::Index::Entry show all
Extended by:
T::Sig
Defined in:
lib/ruby_indexer/lib/ruby_indexer/index.rb

Overview

Alias represents a resolved alias, which points to an existing constant target

Instance Attribute Summary collapse

Attributes inherited from RubyIndexer::Index::Entry

#comments, #file_path, #location, #name, #visibility

Instance Method Summary collapse

Methods inherited from RubyIndexer::Index::Entry

#file_name

Constructor Details

#initialize(target, unresolved_alias) ⇒ Alias

Returns a new instance of Alias.



328
329
330
331
332
# File 'lib/ruby_indexer/lib/ruby_indexer/index.rb', line 328

def initialize(target, unresolved_alias)
  super(unresolved_alias.name, unresolved_alias.file_path, unresolved_alias.location, unresolved_alias.comments)

  @target = target
end

Instance Attribute Details

#targetObject (readonly)

Returns the value of attribute target.



325
326
327
# File 'lib/ruby_indexer/lib/ruby_indexer/index.rb', line 325

def target
  @target
end