Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/asciidoctor/latex/core_ext/colored_string.rb
Overview
Utility methods to display colored strings, e.g., “foo”.cyan, “bar”.red, etc.
Instance Method Summary (collapse)
- - (Object) black
- - (String) blue
- - (Object) cyan
- - (Object) green
- - (Object) magenta
- - (Object) red
- - (Object) white
- - (Object) yellow
Instance Method Details
- (Object) black
36 37 38 |
# File 'lib/asciidoctor/latex/core_ext/colored_string.rb', line 36 def black "\e[1;30m#{self}\e[0m" end |
- (String) blue
8 9 10 |
# File 'lib/asciidoctor/latex/core_ext/colored_string.rb', line 8 def blue "\e[1;34m#{self}\e[0m" end |
- (Object) cyan
28 29 30 |
# File 'lib/asciidoctor/latex/core_ext/colored_string.rb', line 28 def cyan "\e[1;36m#{self}\e[0m" end |
- (Object) green
12 13 14 |
# File 'lib/asciidoctor/latex/core_ext/colored_string.rb', line 12 def green "\e[1;32m#{self}\e[0m" end |
- (Object) magenta
24 25 26 |
# File 'lib/asciidoctor/latex/core_ext/colored_string.rb', line 24 def magenta "\e[1;35m#{self}\e[0m" end |
- (Object) red
16 17 18 |
# File 'lib/asciidoctor/latex/core_ext/colored_string.rb', line 16 def red "\e[1;31m#{self}\e[0m" end |
- (Object) white
32 33 34 |
# File 'lib/asciidoctor/latex/core_ext/colored_string.rb', line 32 def white "\e[1;37m#{self}\e[0m" end |
- (Object) yellow
20 21 22 |
# File 'lib/asciidoctor/latex/core_ext/colored_string.rb', line 20 def yellow "\e[1;33m#{self}\e[0m" end |