Class: MiniAssert::Crayon
- Inherits:
-
Object
- Object
- MiniAssert::Crayon
- Defined in:
- lib/mini_assert/crayon.rb
Overview
STD_OUT printing colors
Class Method Summary collapse
Class Method Details
.colorize(color_code, string) ⇒ Object
7 8 9 |
# File 'lib/mini_assert/crayon.rb', line 7 def colorize(color_code, string) "\e[#{color_code}m#{string}\e[0m" end |
.green(string) ⇒ Object
11 12 13 |
# File 'lib/mini_assert/crayon.rb', line 11 def green(string) colorize(32, string) end |
.red(string) ⇒ Object
15 16 17 |
# File 'lib/mini_assert/crayon.rb', line 15 def red(string) colorize(31, string) end |