Class: RubyIndexer::Entry::Signature

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#parametersObject (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

#formatObject



586
587
588
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 586

def format
  @parameters.map(&:decorated_name).join(", ")
end