Module: SaferRailsConsole::Colors

Extended by:
Colors
Included in:
Colors, Console
Defined in:
lib/safer_rails_console/colors.rb

Constant Summary collapse

NONE =
0
BLACK =
30
RED =
31
GREEN =
32
YELLOW =
33
BLUE =
34
PINK =
35
CYAN =
36
WHITE =
37

Instance Method Summary collapse

Instance Method Details

#color_text(text, color_code) ⇒ Object



17
18
19
# File 'lib/safer_rails_console/colors.rb', line 17

def color_text(text, color_code)
  "\e[#{color_code}m#{text}\e[0m"
end