From: Paul Roche Date: 2010-09-30T05:15:02+09:00 Subject: Re: Accessing variables of instances in an array? Jeremy Bopp wrote: > On 9/29/2010 2:45 PM, Paul Roche wrote: >> >> >> How can I print out specific variables for each instance? >> >> >> eg variables... >> >> name >> age > > an_arry.each { |item| puts "#{item.name} #{item.age}" } > > -Jeremy Thanks Jeremy, that does the job. By the way is 'item' a keyword? -- Posted via http://www.ruby-forum.com/.