Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/commitgpt/string.rb

Overview

Open String to add color

Instance Method Summary collapse

Instance Method Details

#cyanObject



40
41
42
# File 'lib/commitgpt/string.rb', line 40

def cyan
  "\e[36m#{self}\e[0m"
end

#grayObject



32
33
34
# File 'lib/commitgpt/string.rb', line 32

def gray
  "\e[90m#{self}\e[0m"
end

#greenObject



28
29
30
# File 'lib/commitgpt/string.rb', line 28

def green
  "\e[32m#{self}\e[0m"
end

#magentaObject



36
37
38
# File 'lib/commitgpt/string.rb', line 36

def magenta
  "\e[35m#{self}\e[0m"
end

#redObject



24
25
26
# File 'lib/commitgpt/string.rb', line 24

def red
  "\e[31m#{self}\e[0m"
end

#yellowObject



44
45
46
# File 'lib/commitgpt/string.rb', line 44

def yellow
  "\e[33m#{self}\e[0m"
end