Module: Acclaim::CoreExtensions::String::ANSI
- Defined in:
- lib/acclaim/core_extensions/string/ansi.rb
Overview
Object-oriented ANSI escape code API.
Instance Method Summary collapse
-
#background(color) ⇒ String
Applies background color to this string.
-
#effects(*effects) ⇒ String
Applies text effects to this string.
-
#foreground(color) ⇒ String
Applies foreground color to this string.
Instance Method Details
#background(color) ⇒ String
Applies background color to this string.
30 31 32 |
# File 'lib/acclaim/core_extensions/string/ansi.rb', line 30 def background(color) Acclaim::ANSI.background_color self, color end |
#effects(*effects) ⇒ String
Applies text effects to this string.
39 40 41 |
# File 'lib/acclaim/core_extensions/string/ansi.rb', line 39 def effects(*effects) Acclaim::ANSI.effects self, *effects end |
#foreground(color) ⇒ String
Applies foreground color to this string.
20 21 22 |
# File 'lib/acclaim/core_extensions/string/ansi.rb', line 20 def foreground(color) Acclaim::ANSI.foreground_color self, color end |