Apply suggestions from code review
Co-authored-by: Douglas Eichelberger <697964+dduugg@users.noreply.github.com>
This commit is contained in:
parent
9dfe11870e
commit
75db3b8e21
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user