Class: RubyIndexer::Entry::UnresolvedAlias
- Inherits:
-
RubyIndexer::Entry
- Object
- RubyIndexer::Entry
- RubyIndexer::Entry::UnresolvedAlias
- Extended by:
- T::Sig
- 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
Returns the value of attribute nesting.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Attributes inherited from RubyIndexer::Entry
#comments, #file_path, #location, #name, #visibility
Instance Method Summary collapse
-
#initialize(target, nesting, name, file_path, location, comments) ⇒ UnresolvedAlias
constructor
rubocop:disable Metrics/ParameterLists.
Methods inherited from RubyIndexer::Entry
Constructor Details
#initialize(target, nesting, name, file_path, location, comments) ⇒ UnresolvedAlias
rubocop:disable Metrics/ParameterLists
183 184 185 186 187 188 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 183 def initialize(target, nesting, name, file_path, location, comments) # rubocop:disable Metrics/ParameterLists super(name, file_path, location, comments) @target = target @nesting = nesting end |
Instance Attribute Details
#nesting ⇒ Object (readonly)
Returns the value of attribute nesting.
171 172 173 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 171 def nesting @nesting end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
168 169 170 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 168 def target @target end |