From: Zayd Abdullah Date: 2009-03-03T03:51:33+09:00 Subject: Re: Ruby beginner Problem --001636163cc78f795a0464274eb8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit <<< I don't think you actually need a class at all You're just calling a procedure. Thanks, but I was just trying to practice using classes, and instance variables :) However I did find a quicker approach using less code to run this program without using class. See Below bottles = 99 98.times do |num| puts "#{bottles} bottles of beer on the wall" puts "#{bottles} bottles of beer" puts "Take one down pass it around" bottles -=1 puts "#{bottles} bottles of beer on the wall" unless bottles == 1 if bottles == 1 puts "#{bottles} bottle of beer on the wall" puts "#{bottles} bottle of beer on the wall" puts "#{bottles} bottle of beer" puts "Take one down pass it around" puts "No more bottles of beer on the wall" end end Kindest Regards Zayd On Mon, Mar 2, 2009 at 3:38 AM, Mike Stephens wrote: > I don't think you actually need a class at all You're just calling a > procedure. > -- > Posted via http://www.ruby-forum.com/. > > --001636163cc78f795a0464274eb8--