Well, I ultametely solved the puzzle by playing around with stuff.  This 
was the code I ended up with.  But, is this what the class should look 
like, or is this bad code?  Again, it passes all the tests (again, I 
will s).  The goal of this program basically is that if you give it some 
title, it turns it into the correct title following "title rules".  So, 
first word has to be capitalized no matter what, and words contained in 
the array_words list are suppose to always be lowercase.  Is there 
anything wrong with this code or how my class is structured?  Its solves 
the problem, but don't want it if its bad structure for a class:

class Name
  attr_accessor :title

  def initialize(title=nil)
    @title=title
  end

  def title
    array_words=%w(and of in the a an)
    @title2=@title.scan(/\w+/)
    word_number=0
    @title2.each do |title|
      if array_words.include?(title) && word_number >= 1
        title
        word_number+=1
      else
        title.capitalize!
        word_number+=1
      end
    end
    @title2.join(" ")
  end

end

-- 
Posted via http://www.ruby-forum.com/.