Class: RubyIndexer::Entry::MethodAlias
- Inherits:
-
RubyIndexer::Entry
- Object
- RubyIndexer::Entry
- RubyIndexer::Entry::MethodAlias
- Extended by:
- T::Sig
- Defined in:
- lib/ruby_indexer/lib/ruby_indexer/entry.rb
Overview
A method alias is a resolved alias entry that points to the exact method target it refers to
Instance Attribute Summary collapse
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Attributes inherited from RubyIndexer::Entry
#comments, #file_path, #location, #name, #visibility
Instance Method Summary collapse
- #decorated_parameters ⇒ Object
- #formatted_signatures ⇒ Object
-
#initialize(target, unresolved_alias) ⇒ MethodAlias
constructor
A new instance of MethodAlias.
- #parameters ⇒ Object
- #signatures ⇒ Object
Methods inherited from RubyIndexer::Entry
#file_name, #private?, #protected?, #public?
Constructor Details
#initialize(target, unresolved_alias) ⇒ MethodAlias
Returns a new instance of MethodAlias.
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 532 def initialize(target, unresolved_alias) full_comments = ["Alias for #{target.name}\n"] full_comments.concat(unresolved_alias.comments) full_comments << "\n" full_comments.concat(target.comments) super( unresolved_alias.new_name, unresolved_alias.file_path, unresolved_alias.location, full_comments, ) @target = target @owner = T.let(unresolved_alias.owner, T.nilable(Entry::Namespace)) end |
Instance Attribute Details
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
529 530 531 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 529 def owner @owner end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
526 527 528 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 526 def target @target end |
Instance Method Details
#decorated_parameters ⇒ Object
555 556 557 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 555 def decorated_parameters @target.decorated_parameters end |
#formatted_signatures ⇒ Object
560 561 562 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 560 def formatted_signatures @target.formatted_signatures end |
#parameters ⇒ Object
550 551 552 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 550 def parameters @target.parameters end |
#signatures ⇒ Object
565 566 567 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 565 def signatures @target.signatures end |