lib/parlour/rbi_generator/module_namespace.rb in parlour-6.0.1 vs lib/parlour/rbi_generator/module_namespace.rb in parlour-7.0.0
- old
+ new
@@ -3,10 +3,12 @@
class RbiGenerator < Generator
# Represents a module definition.
class ModuleNamespace < Namespace
extend T::Sig
+ Child = type_member {{ fixed: RbiObject }}
+
sig do
params(
generator: Generator,
name: String,
final: T::Boolean,
@@ -98,21 +100,17 @@
# @return [void]
def merge_into_self(others)
super
end
- sig { override.returns(String) }
- # Returns a human-readable brief string description of this module.
- # @return [String]
- def describe
- "Module #{name} - #{"interface, " if interface}" +
- "#{"abstract, " if abstract}#{children.length} " +
- "children, #{includes.length} includes, #{extends.length} extends"
- end
-
sig { override.void }
def generalize_from_rbi!
super
+ end
+
+ sig { override.returns(T::Array[T.any(Symbol, T::Hash[Symbol, String])]) }
+ def describe_attrs
+ [:children, :abstract, :interface, :final, :sealed]
end
end
end
end