Class: RubyIndexer::Entry::UnresolvedConstantAlias
- Inherits:
-
RubyIndexer::Entry
- Object
- RubyIndexer::Entry
- RubyIndexer::Entry::UnresolvedConstantAlias
- Defined in:
- lib/ruby_indexer/lib/ruby_indexer/entry.rb
Overview
An UnresolvedAlias points to a constant alias with a right hand side that has not yet been resolved. For example, if we find
“‘ruby
CONST = Foo
“‘ Before we have discovered Foo, there’s no way to eagerly resolve this alias to the correct target constant. All aliases are inserted as UnresolvedAlias in the index first and then we lazily resolve them to the correct target in [Index#resolve]. If the right hand side contains a constant that doesn’t exist, then it’s not possible to resolve the alias and it will remain an UnresolvedAlias until the right hand side constant exists
Instance Attribute Summary collapse
-
#nesting ⇒ Object
readonly
: Array.
-
#target ⇒ Object
readonly
: String.
Attributes inherited from RubyIndexer::Entry
#configuration, #location, #name, #uri, #visibility
Instance Method Summary collapse
-
#initialize(configuration, target, nesting, name, uri, location, comments) ⇒ UnresolvedConstantAlias
constructor
: (Configuration configuration, String target, Array nesting, String name, URI::Generic uri, Location location, String? comments) -> void.
Methods inherited from RubyIndexer::Entry
#comments, #file_name, #file_path, #private?, #protected?, #public?
Constructor Details
#initialize(configuration, target, nesting, name, uri, location, comments) ⇒ UnresolvedConstantAlias
: (Configuration configuration, String target, Array nesting, String name, URI::Generic uri, Location location, String? comments) -> void
374 375 376 377 378 379 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 374 def initialize(configuration, target, nesting, name, uri, location, comments) # rubocop:disable Metrics/ParameterLists super(configuration, name, uri, location, comments) @target = target @nesting = nesting end |
Instance Attribute Details
#nesting ⇒ Object (readonly)
: Array
371 372 373 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 371 def nesting @nesting end |
#target ⇒ Object (readonly)
: String
368 369 370 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 368 def target @target end |