diff --git a/Library/Homebrew/sorbet/rbi/dsl/tty.rbi b/Library/Homebrew/sorbet/rbi/dsl/tty.rbi index 84b763a6d5..f57d3260c1 100644 --- a/Library/Homebrew/sorbet/rbi/dsl/tty.rbi +++ b/Library/Homebrew/sorbet/rbi/dsl/tty.rbi @@ -4,7 +4,7 @@ # This is an autogenerated file for dynamic methods in `Tty`. # Please instead update this file by running `bin/tapioca dsl Tty`. -module +module Tty sig { returns(String) } def blue; end diff --git a/Library/Homebrew/sorbet/tapioca/compilers/tty.rb b/Library/Homebrew/sorbet/tapioca/compilers/tty.rb index 73239a5b05..7ad90277d0 100644 --- a/Library/Homebrew/sorbet/tapioca/compilers/tty.rb +++ b/Library/Homebrew/sorbet/tapioca/compilers/tty.rb @@ -16,13 +16,13 @@ module Tapioca sig { override.void } def decorate - root.create_path(constant) do |klass| + root.create_module(constant.name) do |mod| dynamic_methods = ::Tty::COLOR_CODES.keys + ::Tty::STYLE_CODES.keys + ::Tty::SPECIAL_CODES.keys methods = ::Tty.methods(false).sort.select { |method| dynamic_methods.include?(method) } methods.each do |method| return_type = (method.to_s.end_with?("?") ? "T::Boolean" : "String") - klass.create_method(method.to_s, return_type:) + mod.create_method(method.to_s, return_type:) end end end