Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/zypper/upgraderepo/utils.rb
Overview
String class patch.
Instance Method Summary collapse
- #bg_black ⇒ Object
- #bg_blue ⇒ Object
- #bg_brown ⇒ Object
- #bg_cyan ⇒ Object
- #bg_gray ⇒ Object
- #bg_green ⇒ Object
- #bg_magenta ⇒ Object
- #bg_red ⇒ Object
- #black ⇒ Object
- #blue ⇒ Object
- #bold ⇒ Object
- #clean ⇒ Object
- #cr ⇒ Object
- #cyan ⇒ Object
- #gray ⇒ Object
- #green ⇒ Object
- #magenta ⇒ Object
- #new_line ⇒ Object
- #none ⇒ Object
- #red ⇒ Object
- #reverse_color ⇒ Object
- #yellow ⇒ Object
Instance Method Details
#bg_black ⇒ Object
44 45 46 |
# File 'lib/zypper/upgraderepo/utils.rb', line 44 def bg_black "\033[40m#{self}\0330m" end |
#bg_blue ⇒ Object
60 61 62 |
# File 'lib/zypper/upgraderepo/utils.rb', line 60 def bg_blue "\033[44m#{self}\033[0m" end |
#bg_brown ⇒ Object
56 57 58 |
# File 'lib/zypper/upgraderepo/utils.rb', line 56 def bg_brown "\033[43m#{self}\033[0m" end |
#bg_cyan ⇒ Object
68 69 70 |
# File 'lib/zypper/upgraderepo/utils.rb', line 68 def bg_cyan "\033[46m#{self}\033[0m" end |
#bg_gray ⇒ Object
72 73 74 |
# File 'lib/zypper/upgraderepo/utils.rb', line 72 def bg_gray "\033[47m#{self}\033[0m" end |
#bg_green ⇒ Object
52 53 54 |
# File 'lib/zypper/upgraderepo/utils.rb', line 52 def bg_green "\033[42m#{self}\033[0m" end |
#bg_magenta ⇒ Object
64 65 66 |
# File 'lib/zypper/upgraderepo/utils.rb', line 64 def bg_magenta "\033[45m#{self}\033[0m" end |
#bg_red ⇒ Object
48 49 50 |
# File 'lib/zypper/upgraderepo/utils.rb', line 48 def bg_red "\033[41m#{self}\033[0m" end |
#black ⇒ Object
12 13 14 |
# File 'lib/zypper/upgraderepo/utils.rb', line 12 def black "\033[30m#{self}\033[0m" end |
#blue ⇒ Object
28 29 30 |
# File 'lib/zypper/upgraderepo/utils.rb', line 28 def blue "\033[34m#{self}\033[0m" end |
#bold ⇒ Object
76 77 78 |
# File 'lib/zypper/upgraderepo/utils.rb', line 76 def bold "\033[1m#{self}\033[22m" end |
#clean ⇒ Object
88 89 90 |
# File 'lib/zypper/upgraderepo/utils.rb', line 88 def clean "\e[K#{self}" end |
#cr ⇒ Object
84 85 86 |
# File 'lib/zypper/upgraderepo/utils.rb', line 84 def cr "\r#{self}" end |
#cyan ⇒ Object
36 37 38 |
# File 'lib/zypper/upgraderepo/utils.rb', line 36 def cyan "\033[36m#{self}\033[0m" end |
#gray ⇒ Object
40 41 42 |
# File 'lib/zypper/upgraderepo/utils.rb', line 40 def gray "\033[37m#{self}\033[0m" end |
#green ⇒ Object
20 21 22 |
# File 'lib/zypper/upgraderepo/utils.rb', line 20 def green "\033[32m#{self}\033[0m" end |
#magenta ⇒ Object
32 33 34 |
# File 'lib/zypper/upgraderepo/utils.rb', line 32 def magenta "\033[35m#{self}\033[0m" end |
#new_line ⇒ Object
92 93 94 |
# File 'lib/zypper/upgraderepo/utils.rb', line 92 def new_line "\n#{self}" end |
#none ⇒ Object
96 97 98 |
# File 'lib/zypper/upgraderepo/utils.rb', line 96 def none self end |
#red ⇒ Object
16 17 18 |
# File 'lib/zypper/upgraderepo/utils.rb', line 16 def red "\033[31m#{self}\033[0m" end |
#reverse_color ⇒ Object
80 81 82 |
# File 'lib/zypper/upgraderepo/utils.rb', line 80 def reverse_color "\033[7m#{self}\033[27m" end |
#yellow ⇒ Object
24 25 26 |
# File 'lib/zypper/upgraderepo/utils.rb', line 24 def yellow "\033[33m#{self}\033[0m" end |