Module: StatsLite::Log

Defined in:
lib/stats_lite/log.rb

Class Method Summary collapse

Class Method Details

.blue(str) ⇒ Object



22
23
24
# File 'lib/stats_lite/log.rb', line 22

def blue(str)
  colorize(str, 34)
end

.colorize(str, color_code) ⇒ Object



6
7
8
# File 'lib/stats_lite/log.rb', line 6

def colorize(str, color_code)
  "\e[#{color_code}m#{str}\e[0m"
end

.green(str) ⇒ Object



14
15
16
# File 'lib/stats_lite/log.rb', line 14

def green(str)
  colorize(str, 32)
end

.light_blue(str) ⇒ Object



30
31
32
# File 'lib/stats_lite/log.rb', line 30

def light_blue(str)
  colorize(str, 36)
end

.pink(str) ⇒ Object



26
27
28
# File 'lib/stats_lite/log.rb', line 26

def pink(str)
  colorize(str, 35)
end

.red(str) ⇒ Object



10
11
12
# File 'lib/stats_lite/log.rb', line 10

def red(str)
  colorize(str, 31)
end

.yellow(str) ⇒ Object



18
19
20
# File 'lib/stats_lite/log.rb', line 18

def yellow(str)
  colorize(str, 33)
end