Class: HumanistErrors::Color

Inherits:
Object
  • Object
show all
Defined in:
lib/humanist_errors/colors.rb

Instance Method Summary collapse

Instance Method Details

#black(string) ⇒ Object



4
5
6
# File 'lib/humanist_errors/colors.rb', line 4

def black(string)
  "\033[30m#{string}\033[0m"
end

#blue(string) ⇒ Object



20
21
22
# File 'lib/humanist_errors/colors.rb', line 20

def blue(string)
  "\033[34m#{string}\033[0m"
end

#brown(string) ⇒ Object



16
17
18
# File 'lib/humanist_errors/colors.rb', line 16

def brown(string)
  "\033[33m#{string}\033[0m"
end

#cyan(string) ⇒ Object



28
29
30
# File 'lib/humanist_errors/colors.rb', line 28

def cyan(string)
  "\033[36m#{string}\033[0m"
end

#gray(string) ⇒ Object



32
33
34
# File 'lib/humanist_errors/colors.rb', line 32

def gray(string)
  "\033[37m#{string}\033[0m"
end

#green(string) ⇒ Object



12
13
14
# File 'lib/humanist_errors/colors.rb', line 12

def green(string)
  "\033[32m#{string}\033[0m"
end

#magenta(string) ⇒ Object



24
25
26
# File 'lib/humanist_errors/colors.rb', line 24

def magenta(string)
  "\033[35m#{string}\033[0m"
end

#red(string) ⇒ Object



8
9
10
# File 'lib/humanist_errors/colors.rb', line 8

def red(string)
  "\033[31m#{string}\033[0m"
end