33
44module RubyIndexer
55 class Entry
6+ #: Configuration
7+ attr_reader :configuration
8+
69 #: String
710 attr_reader :name
811
@@ -17,8 +20,9 @@ class Entry
1720 #: Symbol
1821 attr_accessor :visibility
1922
20- #: (String name, URI::Generic uri, Location location, String? comments) -> void
21- def initialize ( name , uri , location , comments )
23+ #: (Configuration configuration, String name, URI::Generic uri, Location location, String? comments) -> void
24+ def initialize ( configuration , name , uri , location , comments )
25+ @configuration = configuration
2226 @name = name
2327 @uri = uri
2428 @comments = comments
@@ -121,13 +125,13 @@ class Namespace < Entry
121125 #: Location
122126 attr_reader :name_location
123127
124- #: (Array[String] nesting, URI::Generic uri, Location location, Location name_location, String? comments) -> void
125- def initialize ( nesting , uri , location , name_location , comments )
128+ #: (Configuration configuration, Array[String] nesting, URI::Generic uri, Location location, Location name_location, String? comments) -> void
129+ def initialize ( configuration , nesting , uri , location , name_location , comments ) # rubocop:disable Metrics/ParameterLists
126130 @name = nesting . join ( "::" ) #: String
127131 # The original nesting where this namespace was discovered
128132 @nesting = nesting
129133
130- super ( @name , uri , location , comments )
134+ super ( configuration , @name , uri , location , comments )
131135
132136 @name_location = name_location
133137 end
@@ -160,9 +164,9 @@ class Class < Namespace
160164 #: String?
161165 attr_reader :parent_class
162166
163- #: (Array[String] nesting, URI::Generic uri, Location location, Location name_location, String? comments, String? parent_class) -> void
164- def initialize ( nesting , uri , location , name_location , comments , parent_class ) # rubocop:disable Metrics/ParameterLists
165- super ( nesting , uri , location , name_location , comments )
167+ #: (Configuration configuration, Array[String] nesting, URI::Generic uri, Location location, Location name_location, String? comments, String? parent_class) -> void
168+ def initialize ( configuration , nesting , uri , location , name_location , comments , parent_class ) # rubocop:disable Metrics/ParameterLists
169+ super ( configuration , nesting , uri , location , name_location , comments )
166170 @parent_class = parent_class
167171 end
168172
@@ -285,9 +289,9 @@ class Member < Entry
285289 #: Entry::Namespace?
286290 attr_reader :owner
287291
288- #: (String name, URI::Generic uri, Location location, String? comments, Symbol visibility, Entry::Namespace? owner) -> void
289- def initialize ( name , uri , location , comments , visibility , owner ) # rubocop:disable Metrics/ParameterLists
290- super ( name , uri , location , comments )
292+ #: (Configuration configuration, String name, URI::Generic uri, Location location, String? comments, Symbol visibility, Entry::Namespace? owner) -> void
293+ def initialize ( configuration , name , uri , location , comments , visibility , owner ) # rubocop:disable Metrics/ParameterLists
294+ super ( configuration , name , uri , location , comments )
291295 @visibility = visibility
292296 @owner = owner
293297 end
@@ -341,9 +345,9 @@ class Method < Member
341345 #: Location
342346 attr_reader :name_location
343347
344- #: (String name, URI::Generic uri, Location location, Location name_location, String? comments, Array[Signature] signatures, Symbol visibility, Entry::Namespace? owner) -> void
345- def initialize ( name , uri , location , name_location , comments , signatures , visibility , owner ) # rubocop:disable Metrics/ParameterLists
346- super ( name , uri , location , comments , visibility , owner )
348+ #: (Configuration configuration, String name, URI::Generic uri, Location location, Location name_location, String? comments, Array[Signature] signatures, Symbol visibility, Entry::Namespace? owner) -> void
349+ def initialize ( configuration , name , uri , location , name_location , comments , signatures , visibility , owner ) # rubocop:disable Metrics/ParameterLists
350+ super ( configuration , name , uri , location , comments , visibility , owner )
347351 @signatures = signatures
348352 @name_location = name_location
349353 end
@@ -366,9 +370,9 @@ class UnresolvedConstantAlias < Entry
366370 #: Array[String]
367371 attr_reader :nesting
368372
369- #: (String target, Array[String] nesting, String name, URI::Generic uri, Location location, String? comments) -> void
370- def initialize ( target , nesting , name , uri , location , comments ) # rubocop:disable Metrics/ParameterLists
371- super ( name , uri , location , comments )
373+ #: (Configuration configuration, String target, Array[String] nesting, String name, URI::Generic uri, Location location, String? comments) -> void
374+ def initialize ( configuration , target , nesting , name , uri , location , comments ) # rubocop:disable Metrics/ParameterLists
375+ super ( configuration , name , uri , location , comments )
372376
373377 @target = target
374378 @nesting = nesting
@@ -383,6 +387,7 @@ class ConstantAlias < Entry
383387 #: (String target, UnresolvedConstantAlias unresolved_alias) -> void
384388 def initialize ( target , unresolved_alias )
385389 super (
390+ unresolved_alias . configuration ,
386391 unresolved_alias . name ,
387392 unresolved_alias . uri ,
388393 unresolved_alias . location ,
@@ -402,9 +407,9 @@ class ClassVariable < Entry
402407 #: Entry::Namespace?
403408 attr_reader :owner
404409
405- #: (String name, URI::Generic uri, Location location, String? comments, Entry::Namespace? owner) -> void
406- def initialize ( name , uri , location , comments , owner )
407- super ( name , uri , location , comments )
410+ #: (Configuration configuration, String name, URI::Generic uri, Location location, String? comments, Entry::Namespace? owner) -> void
411+ def initialize ( configuration , name , uri , location , comments , owner ) # rubocop:disable Metrics/ParameterLists
412+ super ( configuration , name , uri , location , comments )
408413 @owner = owner
409414 end
410415 end
@@ -414,9 +419,9 @@ class InstanceVariable < Entry
414419 #: Entry::Namespace?
415420 attr_reader :owner
416421
417- #: (String name, URI::Generic uri, Location location, String? comments, Entry::Namespace? owner) -> void
418- def initialize ( name , uri , location , comments , owner )
419- super ( name , uri , location , comments )
422+ #: (Configuration configuration, String name, URI::Generic uri, Location location, String? comments, Entry::Namespace? owner) -> void
423+ def initialize ( configuration , name , uri , location , comments , owner ) # rubocop:disable Metrics/ParameterLists
424+ super ( configuration , name , uri , location , comments )
420425 @owner = owner
421426 end
422427 end
@@ -431,9 +436,9 @@ class UnresolvedMethodAlias < Entry
431436 #: Entry::Namespace?
432437 attr_reader :owner
433438
434- #: (String new_name, String old_name, Entry::Namespace? owner, URI::Generic uri, Location location, String? comments) -> void
435- def initialize ( new_name , old_name , owner , uri , location , comments ) # rubocop:disable Metrics/ParameterLists
436- super ( new_name , uri , location , comments )
439+ #: (Configuration configuration, String new_name, String old_name, Entry::Namespace? owner, URI::Generic uri, Location location, String? comments) -> void
440+ def initialize ( configuration , new_name , old_name , owner , uri , location , comments ) # rubocop:disable Metrics/ParameterLists
441+ super ( configuration , new_name , uri , location , comments )
437442
438443 @new_name = new_name
439444 @old_name = old_name
@@ -456,6 +461,7 @@ def initialize(target, unresolved_alias)
456461 full_comments << target . comments
457462
458463 super (
464+ unresolved_alias . configuration ,
459465 unresolved_alias . new_name ,
460466 unresolved_alias . uri ,
461467 unresolved_alias . location ,
0 commit comments