Class: Tapioca::Compilers::Tty
- Defined in:
- sorbet/tapioca/compilers/tty.rb
Constant Summary collapse
- ConstantType =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
type_member { { fixed: Module } }
Class Method Summary collapse
- .gather_constants ⇒ Object private
Instance Method Summary collapse
- #decorate ⇒ void private
Class Method Details
.gather_constants ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
16 |
# File 'sorbet/tapioca/compilers/tty.rb', line 16 def self.gather_constants = [::Tty] |
Instance Method Details
#decorate ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
19 20 21 22 23 24 25 26 27 |
# File 'sorbet/tapioca/compilers/tty.rb', line 19 def decorate root.create_module(T.must(constant.name)) do |mod| dynamic_methods = ::Tty::COLOR_CODES.keys + ::Tty::STYLE_CODES.keys + ::Tty::SPECIAL_CODES.keys dynamic_methods.each do |method| mod.create_method(method.to_s, return_type: "String", class_method: true) end end end |