Class: RubyIndexer::Entry::ConstantAlias

Inherits:
RubyIndexer::Entry show all
Defined in:
lib/ruby_indexer/lib/ruby_indexer/entry.rb

Overview

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

Instance Attribute Summary collapse

Attributes inherited from RubyIndexer::Entry

#location, #name, #uri, #visibility

Instance Method Summary collapse

Methods inherited from RubyIndexer::Entry

#comments, #file_name, #file_path, #private?, #protected?, #public?

Constructor Details

#initialize(target, unresolved_alias) ⇒ ConstantAlias

: (String target, UnresolvedConstantAlias unresolved_alias) -> void



384
385
386
387
388
389
390
391
392
393
394
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 384

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

  @visibility = unresolved_alias.visibility
  @target = target
end

Instance Attribute Details

#targetObject (readonly)

: String



381
382
383
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 381

def target
  @target
end