Module: Ftpmock::ColorUtils

Defined in:
lib/ftpmock/utils/color_utils.rb

Class Method Summary collapse

Class Method Details

.bold(string) ⇒ Object



23
24
25
# File 'lib/ftpmock/utils/color_utils.rb', line 23

def bold(string)
  "\e[1;39;49m#{string}\e[0m"
end

.colorize(string, color) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/ftpmock/utils/color_utils.rb', line 10

def colorize(string, color)
  case color
  when :red
    "\e[0;91;49m#{string}\e[0m"
  when :yellow
    "\e[0;93;49m#{string}\e[0m"
  when :green
    "\e[0;92;49m#{string}\e[0m"
  else
    string
  end
end

.highlight(string) ⇒ Object

gem colorize, ‘string’.bold.black.on_light_yellow



6
7
8
# File 'lib/ftpmock/utils/color_utils.rb', line 6

def highlight(string)
  "\e[1;30;103m#{string}\e[0m"
end