From: Zayd Abdullah Date: 2009-03-01T16:32:51+09:00 Subject: Re: Ruby beginner Problem --0016361e86bc45191e046409b956 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Thanks Lasitha that worked perfect. I'm slowly getting more comfortable with just the basic :) I'm still getting that same error when compiling my code. I know its right there in front of my face I just can't put my finger on it Kindest Regards Zayd class Bottles def initialize(bottles_of_beer, bottle_word, one_word) @bottles_of_beer = bottles_of_beer @bottle_word = bottle_word @one_word = one_word end my_bottles = Bottles.new(99,'Bottles','Bottle') while my_bottles.bottles_of_beer >= 2 <<*The error is pointing to this line* puts "#{my_bottles.bottles_of_beer} #{my_bottles.bottle_word} of beer on the wall" puts "#{my_bottles.bottles_of_beer} #{my_bottles.bottle_word} of beer" puts "Take one down, pass it around" my_bottles.bottles_of_beer -= 1 if my_bottles.bottles_of_beer == 1 puts "#{my_bottles.bottles_of_beer} bottle of beer on the wall" else puts "#{my.bottles.bottles_of_beer} #{my_bottles.bottle_word}of beer on the wall" end if my_bottles.bottles_of_beer == 1 puts "#{my_bottles.bottles_of_beer} #{my_bottles.one_word} of beer on the wall" puts "#{my_bottles.bottles_of_beer} #{my_bottles.one_word} of beer" puts "Take one down, pass it around" my_bottles.bottles_of_beer -= 1 puts "No more #{my_bottles.bottle_word} of beer on the wall" end end end On Sun, Mar 1, 2009 at 1:24 AM, lasitha wrote: > On Sun, Mar 1, 2009 at 10:46 AM, Zayd Connor wrote: > > I'm using Vim text editor, and have not yet figured out how to auto > format my code. > > :h = > > In Normal mode, hitting == will format the current line. > It takes the usual motion prefixes, so e.g. 5== will format the next 5 > lines. > In Visual mode, = will format the selection. > > This should work for any recognized file type. Most standard vim > installs include the ruby filetype plugin. If yours doesn't or needs > upgrading, see: > http://tinyurl.com/dd2ef9 > > Solidarity, > lasitha. > > --0016361e86bc45191e046409b956--