From: Paul Roche Date: 2010-10-25T00:27:08+09:00 Subject: Re: Utilizing data from a csv file Hassan Schroeder wrote in post #956709: > On Sun, Oct 24, 2010 at 7:34 AM, Paul Roche > wrote: > >> Here is a rough idea I have so far, but it's returning nothing > > No kidding :-) > >> songs = [] >> songs.each {|song| songs << Song.new(song.name, song.owner)} >> ------------------------------- >> Do I have the right idea? > > :~$ irb >>> songs = [] > => [] >>> songs.each {|song| puts song } > => [] >>> > > What exactly would you expect to get out of an empty array? Sure, scrap that :) If I put Song.new(songs.name, songs.id) into this function I get something. Any idea how I can 'create objects'(?) from the data from the csv file? -- Posted via http://www.ruby-forum.com/.