From: James Britt Date: 2005-09-04T21:56:06+09:00 Subject: Re: ruby / rails newbie - Finding documentation in RDocs steveH wrote: > Hi, I'm brand new to ruby, to which I've been attracted by rails (along > with many others, no doubt). I'm trying to hack together my first rxml > template, but my first dip into the rdocs is a total failure. I see > code like this... > > <% for column in Product.content_columns %> > <%= column.human_name %> > <% end %> > > but I can't find a description of class Column anywhere - can't see it > in rails docs, core ruby docs, MySQL/Ruby docs - have I just missed it > or is it somewhere else, or isn't it a class at all but some sort of > dynamic ruby magic which I've totally misunderstood... > In the construct for x in some.collection ... end x is a variable that takes on the file of each successive item in collection. See http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_containers.html and, in general, http://www.ruby-doc.org/docs/ProgrammingRuby/ http://www.ruby-doc.org/gettingstarted/ James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys