Sha256: 5a0ceaae7a6d4fca93d422dd7faae44c187d57ebc2d5a3d0e21f9ae532ef06f7
Contents?: true
Size: 1.17 KB
Versions: 1
Compression:
Stored size: 1.17 KB
Contents
# encoding: utf-8 require 'string_color/version' class String # Return White def white; colorize(self, "\e[1;37m"); end # Return red def red; colorize(self, "\e[31m"); end # Return Light Red def light_red; colorize(self, "\e[1;31m"); end # Return Green def green; colorize(self, "\e[32m"); end # Return Light Green def light_green; colorize(self, "\e[1;32m"); end # Return Yellow def yellow; colorize(self, "\e[1;33m"); end # Return Blue def blue; colorize(self, "\e[34m"); end # Return Light Blue def light_blue; colorize(self, "\e[1;34m"); end # Return Purple def purple; colorize(self, "\e[35m"); end # Return Light Purple def light_purple; colorize(self, "\e[1;35m"); end # Return Brown def brown; colorize(self, "\e[33m"); end # Return Cyan def cyan; colorize(self, "\e[36m"); end # Return Light Cyan def light_cyan; colorize(self, "\e[1;36m"); end # Return Light Gray def light_gray; colorize(self, "\e[37m"); end # Return Dark Gray def dark_gray; colorize(self, "\e[1;30m"); end # Colored text def colorize(text, color_code) "#{color_code}#{text}\e[0m" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
string_color-0.2 | lib/string_color.rb |