Ruby Loops and ANSI Color

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 "                                           "
for w in 
[ "words","in","an","array" ]
	print "   "+w
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: