Here is a quick little script to illustrate loops and the Term-Ansicolor gem:
require "rubygems" require "term/ansicolor" c = Term::ANSIColor print c.white,c.bold,c.on_blue print " " puts for w in [ "words","in","an","array" ] print " "+w end print " " print c.reset print "\n" |
I originally made this because wanted to create a graphic with monospaced letters and color for a game called “5X5X5 Rules”. This is what it looks like when I use the rules. I wanted the wider border, which is the reason for the extra print and puts statements above: