color-block 0.2.0 released
Several weeks ago I made color-block available on github. This is a small library to colorize ruby output. Specifically I wanted to colorize my rake output. In some rake tasks, I didn't have access to the details of the task. So I couldn't add color to each string. Instead color-block allows me to colorize an entire block of code.
Several friends have tested color-block on Windows, Linux and Apple Mac.
Several friends have tested color-block on Windows, Linux and Apple Mac.
require 'color-block'
include ColorBlock
color( :blue ) { "everything in this block is blue!" }
color( :white, :blue ) do
puts "now everything is white on blue!"
color( :green, :black ) { "nesting is supported" }
end
color( :white, :black, :bold ) { "third parameter to specify :bold or :dim" }
Labels: color-block, ruby

0 Comments:
Post a Comment
<< Home