From: Paul Roche Date: 2010-10-25T05:18:12+09:00 Subject: Re: Utilizing data from a csv file Having build_all in Song class was me just trying to see if I could read data with the build_all method. You're right the old implementation you referred to is what I will be working with. This features as you mentioned linking the two lists. I'm just going to try and get myself out of this mudddle. So to be specific.... Here's the original build_all. This is in the library class (there wil be no build_all method in Song) (ignore the !) def self.build_all lib_objs = ObjectSpace.each_object(Library).to_a ! ! songs = ObjectSpace.each_object(Song).to_a ! ! lib_objs.each do |library| ! ! ! songs.each do |song| ! ! ! ! if song.in_libs.include?(library) ! ! ! ! ! then library.songs << song end ! ! ! end ! ! ! end lib_objs end Here is part of the new build_all method.... def self.build_all(lib, songs) new_items_lib = [] lib.each { |iteml| new_items_lib << Library.new(iteml.name, iteml.songx) } new_items_song = [] songs.each { |item| new_items_song << Song.new(item.name, item.album, item.artist, item.time, item.year, item.id, item.in_libs) } It does what I want it to do for 'songs', but throws up an error for 'lib'. I'm going to take a few steps back on this -- Posted via http://www.ruby-forum.com/.