Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/zypper/upgraderepo/utils.rb

Overview

String class patch.

Instance Method Summary collapse

Instance Method Details

#bg_blackObject



44
45
46
# File 'lib/zypper/upgraderepo/utils.rb', line 44

def bg_black
  "\033[40m#{self}\0330m"
end

#bg_blueObject



60
61
62
# File 'lib/zypper/upgraderepo/utils.rb', line 60

def bg_blue
  "\033[44m#{self}\033[0m"
end

#bg_brownObject



56
57
58
# File 'lib/zypper/upgraderepo/utils.rb', line 56

def bg_brown
  "\033[43m#{self}\033[0m"
end

#bg_cyanObject



68
69
70
# File 'lib/zypper/upgraderepo/utils.rb', line 68

def bg_cyan
  "\033[46m#{self}\033[0m"
end

#bg_grayObject



72
73
74
# File 'lib/zypper/upgraderepo/utils.rb', line 72

def bg_gray
  "\033[47m#{self}\033[0m"
end

#bg_greenObject



52
53
54
# File 'lib/zypper/upgraderepo/utils.rb', line 52

def bg_green
  "\033[42m#{self}\033[0m"
end

#bg_magentaObject



64
65
66
# File 'lib/zypper/upgraderepo/utils.rb', line 64

def bg_magenta
  "\033[45m#{self}\033[0m"
end

#bg_redObject



48
49
50
# File 'lib/zypper/upgraderepo/utils.rb', line 48

def bg_red
  "\033[41m#{self}\033[0m"
end

#blackObject



12
13
14
# File 'lib/zypper/upgraderepo/utils.rb', line 12

def black
  "\033[30m#{self}\033[0m"
end

#blueObject



28
29
30
# File 'lib/zypper/upgraderepo/utils.rb', line 28

def blue
  "\033[34m#{self}\033[0m"
end

#boldObject



76
77
78
# File 'lib/zypper/upgraderepo/utils.rb', line 76

def bold
  "\033[1m#{self}\033[22m"
end

#cleanObject



88
89
90
# File 'lib/zypper/upgraderepo/utils.rb', line 88

def clean
  "\e[K#{self}"
end

#crObject



84
85
86
# File 'lib/zypper/upgraderepo/utils.rb', line 84

def cr
  "\r#{self}"
end

#cyanObject



36
37
38
# File 'lib/zypper/upgraderepo/utils.rb', line 36

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

#grayObject



40
41
42
# File 'lib/zypper/upgraderepo/utils.rb', line 40

def gray
  "\033[37m#{self}\033[0m"
end

#greenObject



20
21
22
# File 'lib/zypper/upgraderepo/utils.rb', line 20

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

#magentaObject



32
33
34
# File 'lib/zypper/upgraderepo/utils.rb', line 32

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

#new_lineObject



92
93
94
# File 'lib/zypper/upgraderepo/utils.rb', line 92

def new_line
  "\n#{self}"
end

#noneObject



96
97
98
# File 'lib/zypper/upgraderepo/utils.rb', line 96

def none
  self
end

#redObject



16
17
18
# File 'lib/zypper/upgraderepo/utils.rb', line 16

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

#reverse_colorObject



80
81
82
# File 'lib/zypper/upgraderepo/utils.rb', line 80

def reverse_color
  "\033[7m#{self}\033[27m"
end

#yellowObject



24
25
26
# File 'lib/zypper/upgraderepo/utils.rb', line 24

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