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:
Please read our Terms of Use and our Privacy Policy
Microsoft, Windows, Windows XP, Windows 2003, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. NetAdminTools.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds, and refers to the Linux kernel. The operating system of most distributions that contain the Linux kernel is GNU/Linux. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2012 NetAdminTools.com