lib/parlour/rbs_generator/module_namespace.rb in parlour-6.0.1 vs lib/parlour/rbs_generator/module_namespace.rb in parlour-7.0.0
- old
+ new
@@ -3,10 +3,12 @@
class RbsGenerator < Generator
# Represents a module definition.
class ModuleNamespace < Namespace
extend T::Sig
+ Child = type_member {{ fixed: RbsObject }}
+
sig do
override.params(
indent_level: Integer,
options: Options
).returns(T::Array[String])
@@ -21,15 +23,12 @@
lines << options.indented(indent_level, "module #{name}")
lines += generate_body(indent_level + 1, options)
lines << options.indented(indent_level, "end")
end
- sig { override.returns(String) }
- # Returns a human-readable brief string description of this module.
- # @return [String]
- def describe
- "Module #{name} - #{children.length} " +
- "children, #{includes.length} includes, #{extends.length} extends"
+ sig { override.returns(T::Array[T.any(Symbol, T::Hash[Symbol, String])]) }
+ def describe_attrs
+ [:children]
end
end
end
end