lib/tapioca/compilers/dsl/url_helpers.rb in tapioca-0.4.17 vs lib/tapioca/compilers/dsl/url_helpers.rb in tapioca-0.4.18
- old
+ new
@@ -87,11 +87,11 @@
# end
# ~~~
class UrlHelpers < Base
extend T::Sig
- sig { override.params(root: Parlour::RbiGenerator::Namespace, constant: T.class_of(Module)).void }
+ sig { override.params(root: Parlour::RbiGenerator::Namespace, constant: Module).void }
def decorate(root, constant)
case constant
when GeneratedPathHelpersModule.singleton_class, GeneratedUrlHelpersModule.singleton_class
generate_module_for(root, constant)
else
@@ -125,11 +125,11 @@
constants.concat(NON_DISCOVERABLE_INCLUDERS)
end
private
- sig { params(root: Parlour::RbiGenerator::Namespace, constant: T.class_of(Module)).void }
+ sig { params(root: Parlour::RbiGenerator::Namespace, constant: Module).void }
def generate_module_for(root, constant)
root.create_module(T.must(constant.name)) do |mod|
mod.create_include("::ActionDispatch::Routing::UrlFor")
mod.create_include("::ActionDispatch::Routing::PolymorphicRoutes")
@@ -141,10 +141,10 @@
)
end
end
end
- sig { params(mod: Parlour::RbiGenerator::Namespace, constant: T.class_of(Module), helper_module: Module).void }
+ sig { params(mod: Parlour::RbiGenerator::Namespace, constant: Module, helper_module: Module).void }
def create_mixins_for(mod, constant, helper_module)
include_helper = constant.ancestors.include?(helper_module) || NON_DISCOVERABLE_INCLUDERS.include?(constant)
extend_helper = constant.singleton_class.ancestors.include?(helper_module)
mod.create_include(T.must(helper_module.name)) if include_helper