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
259 260 261 262 263 264 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 259 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.
247 248 249 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 247 def nesting @nesting end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
244 245 246 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 244 def target @target end |