@@ -228,7 +228,7 @@ module RDoc
228
228
# later sees `class Container`. `add_class` automatically upgrades `given_name`
229
229
# to a class in this case.
230
230
#
231
- def add_class : (class_types class_type, ::String given_name, ?::String superclass) -> (RDoc::NormalClass | RDoc::SingleClass)
231
+ def add_class : (class_types class_type, ::String given_name, ?::String superclass, ?Array[RDoc::TypeParameter] ) -> (RDoc::NormalClass | RDoc::SingleClass)
232
232
233
233
# <!--
234
234
# rdoc-file=lib/rdoc/context.rb
@@ -271,7 +271,7 @@ module RDoc
271
271
# Adds a module named `name`. If RDoc already knows `name` is a class then that
272
272
# class is returned instead. See also #add_class.
273
273
#
274
- def add_module : (singleton (RDoc::NormalModule) class_type, String name) -> RDoc::NormalModule
274
+ def add_module : (singleton (RDoc::NormalModule) class_type, String name, ?Array[RDoc::TypeParameter] ) -> RDoc::NormalModule
275
275
276
276
# <!--
277
277
# rdoc-file=lib/rdoc/context.rb
@@ -749,6 +749,25 @@ module RDoc
749
749
def initialize : (String? text, String name, String old_name, RDoc::Comment? comment, ?bool `singleton `) -> void
750
750
end
751
751
752
+ class TypeParameter < CodeObject
753
+ type variance = :invariant | :covariant | :contravariant
754
+
755
+ attr_reader name: String
756
+ attr_reader variance: variance
757
+ attr_reader upper_bound: String?
758
+ attr_reader `unchecked `: bool
759
+
760
+ def initialize : (String name, Symbol variance, ?bool `unchecked `, ?String? upper_bound) -> void
761
+
762
+ def == : (untyped other) -> bool
763
+
764
+ alias eql? ==
765
+
766
+ def unchecked? : () -> bool
767
+
768
+ def to_s : () -> String
769
+ end
770
+
752
771
# <!-- rdoc-file=lib/rdoc/stats.rb -->
753
772
# RDoc statistics collector which prints a summary and report of a project's
754
773
# documentation totals.
0 commit comments