Class: RubyIndexer::Entry::Class

Inherits:
Namespace show all
Defined in:
lib/ruby_indexer/lib/ruby_indexer/entry.rb

Direct Known Subclasses

SingletonClass

Instance Attribute Summary collapse

Attributes inherited from Namespace

#name_location, #nesting

Attributes inherited from RubyIndexer::Entry

#location, #name, #uri, #visibility

Instance Method Summary collapse

Methods inherited from Namespace

#mixin_operation_module_names, #mixin_operations

Methods inherited from RubyIndexer::Entry

#comments, #file_name, #file_path, #private?, #protected?, #public?

Constructor Details

#initialize(nesting, uri, location, name_location, comments, parent_class) ⇒ Class

: (Array nesting, URI::Generic uri, Location location, Location name_location, String? comments, String? parent_class) -> void



164
165
166
167
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 164

def initialize(nesting, uri, location, name_location, comments, parent_class) # rubocop:disable Metrics/ParameterLists
  super(nesting, uri, location, name_location, comments)
  @parent_class = parent_class
end

Instance Attribute Details

#parent_classObject (readonly)

The unresolved name of the parent class. This may return ‘nil`, which indicates the lack of an explicit parent and therefore ::Object is the correct parent class : String?



161
162
163
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 161

def parent_class
  @parent_class
end

Instance Method Details

#ancestor_hashObject

: -> Integer



171
172
173
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 171

def ancestor_hash
  [mixin_operation_module_names, @parent_class].hash
end