#99 Bottles of Beer on the Wall #by Daniel Straight, July 10, 2006 #see http://ruby-lang.org/en/ for info on Ruby #This version adds a to_w (to word) conversion to the Integer class #and then uses it to print the lyrics with words instead of numerals class Integer def to_w words = { 0 => "no", 1 => "one", 2 => "two", 3 => "three", 4 => "four", 5 => "five", 6 => "six", 7 => "seven", 8 => "eight", 9 => "nine", 10 => "ten", 11 => "eleven", 12 => "twelve", 13 => "thirteen", 14 => "fourteen", 15 => "fifteen", 16 => "sixteen", 17 => "seventeen", 18 => "eighteen", 19 => "nineteen"