Class: RubyIndexer::Entry::Signature
- Inherits:
-
Object
- Object
- RubyIndexer::Entry::Signature
- Extended by:
- T::Sig
- Defined in:
- lib/ruby_indexer/lib/ruby_indexer/entry.rb
Overview
Ruby doesn’t support method overloading, so a method will have only one signature. However RBS can represent the concept of method overloading, with different return types based on the arguments passed, so we need to store all the signatures.
Instance Attribute Summary collapse
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(parameters) ⇒ Signature
constructor
A new instance of Signature.
Constructor Details
#initialize(parameters) ⇒ Signature
580 581 582 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 580 def initialize(parameters) @parameters = parameters end |
Instance Attribute Details
#parameters ⇒ Object (readonly)
Returns the value of attribute parameters.
577 578 579 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 577 def parameters @parameters end |
Instance Method Details
#format ⇒ Object
586 587 588 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 586 def format @parameters.map(&:decorated_name).join(", ") end |