class String
Public Instance Methods
bg_black()
click to toggle source
# File lib/brocli/string.rb, line 15 def bg_black; "\e[40m#{self}\e[0m" end
bg_blue()
click to toggle source
# File lib/brocli/string.rb, line 19 def bg_blue; "\e[44m#{self}\e[0m" end
bg_brown()
click to toggle source
# File lib/brocli/string.rb, line 18 def bg_brown; "\e[43m#{self}\e[0m" end
bg_cyan()
click to toggle source
# File lib/brocli/string.rb, line 21 def bg_cyan; "\e[46m#{self}\e[0m" end
bg_gray()
click to toggle source
# File lib/brocli/string.rb, line 22 def bg_gray; "\e[47m#{self}\e[0m" end
bg_green()
click to toggle source
# File lib/brocli/string.rb, line 17 def bg_green; "\e[42m#{self}\e[0m" end
bg_magenta()
click to toggle source
# File lib/brocli/string.rb, line 20 def bg_magenta; "\e[45m#{self}\e[0m" end
bg_red()
click to toggle source
# File lib/brocli/string.rb, line 16 def bg_red; "\e[41m#{self}\e[0m" end
black()
click to toggle source
defining custom color schemes for the bash output string, feel free to add more color unix codes calling all the methods to the String
class itself.
# File lib/brocli/string.rb, line 6 def black; "\e[30m#{self}\e[0m" end
blink()
click to toggle source
# File lib/brocli/string.rb, line 27 def blink; "\e[5m#{self}\e[25m" end
blue()
click to toggle source
# File lib/brocli/string.rb, line 10 def blue; "\e[34m#{self}\e[0m" end
bold()
click to toggle source
# File lib/brocli/string.rb, line 24 def bold; "\e[1m#{self}\e[22m" end
brown()
click to toggle source
# File lib/brocli/string.rb, line 9 def brown; "\e[33m#{self}\e[0m" end
cyan()
click to toggle source
# File lib/brocli/string.rb, line 12 def cyan; "\e[36m#{self}\e[0m" end
gray()
click to toggle source
# File lib/brocli/string.rb, line 13 def gray; "\e[37m#{self}\e[0m" end
green()
click to toggle source
# File lib/brocli/string.rb, line 8 def green; "\e[32m#{self}\e[0m" end
italic()
click to toggle source
# File lib/brocli/string.rb, line 25 def italic; "\e[3m#{self}\e[23m" end
magenta()
click to toggle source
# File lib/brocli/string.rb, line 11 def magenta; "\e[35m#{self}\e[0m" end
red()
click to toggle source
# File lib/brocli/string.rb, line 7 def red; "\e[31m#{self}\e[0m" end
reverse_color()
click to toggle source
# File lib/brocli/string.rb, line 28 def reverse_color; "\e[7m#{self}\e[27m" end
underline()
click to toggle source
# File lib/brocli/string.rb, line 26 def underline; "\e[4m#{self}\e[24m" end