From: John William Date: 2010-03-11T09:35:50+09:00 Subject: iterate through an @Array New to ruby If I have an Array @sample_array How do I display the attr_accessors in a table This doesn’t seem to be the right way as it repeats the table each time it iterates through the array. Thanks, John @sample_array.each do |t| puts "" puts"" puts “
#{t.name}#{t.address}#{t.city}#{t.state}
” end -- Posted via http://www.ruby-forum.com/.