Class: RubyIndexer::Entry::Method

Inherits:
Member show all
Extended by:
T::Sig
Defined in:
lib/ruby_indexer/lib/ruby_indexer/entry.rb

Instance Attribute Summary collapse

Attributes inherited from Member

#owner

Attributes inherited from RubyIndexer::Entry

#comments, #file_path, #location, #name, #visibility

Instance Method Summary collapse

Methods inherited from Member

#decorated_parameters, #formatted_signatures, #parameters

Methods inherited from RubyIndexer::Entry

#file_name, #private?, #protected?, #public?

Constructor Details

#initialize(name, file_path, location, name_location, comments, signatures, visibility, owner) ⇒ Method

rubocop:disable Metrics/ParameterLists



398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 398

def initialize(name, file_path, location, name_location, comments, signatures, visibility, owner) # rubocop:disable Metrics/ParameterLists
  super(name, file_path, location, comments, visibility, owner)
  @signatures = signatures
  @name_location = T.let(
    if name_location.is_a?(Prism::Location)
      Location.new(
        name_location.start_line,
        name_location.end_line,
        name_location.start_column,
        name_location.end_column,
      )
    else
      name_location
    end,
    RubyIndexer::Location,
  )
end

Instance Attribute Details

#name_locationObject (readonly)

Returns the value of attribute name_location.



384
385
386
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 384

def name_location
  @name_location
end

#signaturesObject (readonly)

Returns the value of attribute signatures.



380
381
382
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 380

def signatures
  @signatures
end