Module: OutputColor

Defined in:
lib/feature_map/output_color.rb

Overview

frozen_string_literal: true

Class Method Summary collapse

Class Method Details

.blue(text) ⇒ Object



21
22
23
# File 'lib/feature_map/output_color.rb', line 21

def self.blue(text)
  colorize(34, text)
end

.colorize(color_code, text) ⇒ Object



5
6
7
# File 'lib/feature_map/output_color.rb', line 5

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

.green(text) ⇒ Object



13
14
15
# File 'lib/feature_map/output_color.rb', line 13

def self.green(text)
  colorize(32, text)
end

.light_blue(text) ⇒ Object



29
30
31
# File 'lib/feature_map/output_color.rb', line 29

def self.light_blue(text)
  colorize(36, text)
end

.pink(text) ⇒ Object



25
26
27
# File 'lib/feature_map/output_color.rb', line 25

def self.pink(text)
  colorize(35, text)
end

.red(text) ⇒ Object



9
10
11
# File 'lib/feature_map/output_color.rb', line 9

def self.red(text)
  colorize(31, text)
end

.yellow(text) ⇒ Object



17
18
19
# File 'lib/feature_map/output_color.rb', line 17

def self.yellow(text)
  colorize(33, text)
end