Module: Bridgetown::Foundation::CoreExt::String::Colorize
- Extended by:
- Inclusive::Class
- Defined in:
- bridgetown-foundation/lib/bridgetown/foundation/core_ext/string.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#reset_ansi ⇒ Object
Reset output colors back to a regular string output.
Class Method Details
.ansi ⇒ Bridgetown::Foundation::Packages::Ansi
11 |
# File 'bridgetown-foundation/lib/bridgetown/foundation/core_ext/string.rb', line 11 public_packages def ansi = [Bridgetown::Foundation::Packages::Ansi] |
.included(klass) ⇒ Object
13 14 15 16 17 18 19 |
# File 'bridgetown-foundation/lib/bridgetown/foundation/core_ext/string.rb', line 13 def included(klass) ansi.tap do |a| a.colors.each_key do |color| klass.define_method(color) { |*args| a.public_send(color, self, *args) } end end end |