Apply suggestions from code review

Co-authored-by: Douglas Eichelberger <697964+dduugg@users.noreply.github.com>
This commit is contained in:
Issy Long 2024-03-30 19:54:51 +00:00 committed by GitHub
parent 9dfe11870e
commit 75db3b8e21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,13 +23,13 @@ module Tapioca
next if Homebrew::EnvConfig::CUSTOM_IMPLEMENTATIONS.include?(env)
name = Homebrew::EnvConfig.env_method_name(env, hash)
dynamic_methods[name] = { default: hash[:default] }
dynamic_methods[name] = hash[:default]
end
dynamic_methods.each_key do |method|
dynamic_methods.each do |method, default|
return_type = if method.end_with?("?")
T::Boolean
elsif (default = dynamic_methods[method][:default])
elsif default
default.class
else
T.nilable(String)