Sha256: 518bf3372105958bb506a7ccbb88692731659c66370ca42c51f74e93504c43bc
Contents?: true
Size: 307 Bytes
Versions: 7
Compression:
Stored size: 307 Bytes
Contents
# String#ruby2d_colorize # Extend `String` to include some fancy colors class String def ruby2d_colorize(c); "\e[#{c}m#{self}\e[0m" end def bold; ruby2d_colorize('1') end def info; ruby2d_colorize('1;34') end def warn; ruby2d_colorize('1;33') end def error; ruby2d_colorize('1;31') end end
Version data entries
7 entries across 7 versions & 2 rubygems