module String::ANSI
Provides some methods to colourize strings for output to the terminal.
Constants
Public Instance Methods
wrap_ansi(code)
click to toggle source
Wraps this string in the given ANSI
code.
# File lib/spark/core_ext/string.rb, line 28 def wrap_ansi code "\033#{code}#{self}\033[0m" end