From: Jeremy Bopp Date: 2010-10-25T23:24:32+09:00 Subject: Re: Utilizing data from a csv file On 10/24/2010 3:18 PM, Paul Roche wrote: > 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. FYI, what you're trying to do with CSV files is often handled with a relational database. Have you considered trying out sqlite? There are some gems such as ActiveRecord that can make using that database backend and others relatively easy. > 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 If you want some help with that, we'll need to know the details of the error. If you're just stating what your working on next though, good luck. :-) -Jeremy