Sha256: be87f28286923a09860820092caf6eb2cda7e5931e63cc52681ee0acbda425fc
Contents?: true
Size: 544 Bytes
Versions: 104
Compression:
Stored size: 544 Bytes
Contents
class String module Colors RED = 31 GREEN = 32 YELLOW = 33 BLUE = 34 PURPLE = 35 CYAN = 36 GREY = 37 end def red colorize(Colors::RED) end def green colorize(Colors::GREEN) end def yellow colorize(Colors::YELLOW) end def blue colorize(Colors::BLUE) end def purple colorize(Colors::PURPLE) end def cyan colorize(Colors::CYAN) end def grey colorize(Colors::GREY) end def colorize(color_code) "\e[#{color_code}m#{self}\e[0m" end end
Version data entries
104 entries across 104 versions & 1 rubygems