Module: EasyCard::ColorString
- Defined in:
- lib/easycard/color_string.rb
Class Method Summary collapse
Class Method Details
.bold(str) ⇒ Object
4 |
# File 'lib/easycard/color_string.rb', line 4 def bold(str); "\033[1m#{str}\033[22m" end |
.green(str) ⇒ Object
6 |
# File 'lib/easycard/color_string.rb', line 6 def green(str); bold("\033[32m#{str}\033[0m") end |
.red(str) ⇒ Object
5 |
# File 'lib/easycard/color_string.rb', line 5 def red(str); bold("\033[31m#{str}\033[0m") end |
.yellow(str) ⇒ Object
7 |
# File 'lib/easycard/color_string.rb', line 7 def yellow(str); bold("\033[33m#{str}\033[0m") end |