Skip to content
ghouston edited this page Sep 13, 2010 · 7 revisions

Color-block

An easy to use library to colorize output. I created this script to add color output to my rake builds. In some rake tasks, I didn’t have
access to the strings. So this library allows coloring an entire block. The prior color is restored when the block is exited. For example:


require 'color-block'
include ColorBlock
color( :blue ) { puts "everything in this block is blue!" }

Clone this wiki locally