Sha256: ccebb55204bf277e7e4924875989cf59b8a59edb0a93ed458cc6278626efb19e
Contents?: true
Size: 734 Bytes
Versions: 9
Compression:
Stored size: 734 Bytes
Contents
class String # colorization def colorize(color_code) "\e[#{color_code}m#{self}\e[0m" end def red colorize(31) end def green colorize(32) end def yellow colorize(33) end def gray colorize(37) end def blue colorize(34) end def pink colorize(35) end def light_blue colorize(36) end def bg_black; "\e[40m#{self}\e[0m" end def bg_red; "\e[41m#{self}\e[0m" end def bg_green; "\e[42m#{self}\e[0m" end def bg_brown; "\e[43m#{self}\e[0m" end def bg_blue; "\e[44m#{self}\e[0m" end def bg_magenta; "\e[45m#{self}\e[0m" end def bg_cyan; "\e[46m#{self}\e[0m" end def bg_gray; "\e[47m#{self}\e[0m" end end
Version data entries
9 entries across 9 versions & 1 rubygems