ruby-qa/lib/rubyqa/overrides.rb

23 lines
899 B
Ruby

module RubyQA
class ::String
def red () "\e[0;31m#{self}\e[0m" end
def red_background ()"\e[0;41m#{self}\e[0m" end
def green () "\e[0;32m#{self}\e[0m" end
def green_background ()"\e[0;42m#{self}\e[0m" end
def yellow () "\e[0;33m#{self}\e[0m" end
def yellow_background ()"\e[0;43m#{self}\e[0m" end
def blue () "\e[0;34m#{self}\e[0m" end
def blue_background ()"\e[0;44m#{self}\e[0m" end
def magenta () "\e[0;35m#{self}\e[0m" end
def magenta_background ()"\e[0;45m#{self}\e[0m" end
def cyan () "\e[0;36m#{self}\e[0m" end
def cyan_background ()"\e[0;46m#{self}\e[0m" end
def white () "\e[0;37m#{self}\e[0m" end
def white_background ()"\e[0;47m#{self}\e[0m" end
def blinking () "\e[5m#{self}\e[25m" end
def hidden () "\e[8m#{self}\e[28m" end
def bold ()"\e[1m#{self}\e[22m" end
def underline () "\e[4m#{self}\e[24m" end
end
end