Wow, thanks for the plentiful replies!

I think I was averse to creating multiple classes in one file, so 
thought it best to try and create the CsvRow inline, it had crossed my 
mind but I got hung up on the semantics of the book asking for an 
object.

I create a CsvRow class and am now getting an each to return a CsvRow, 
AWESOME!

The next bit I'm getting a little caught up on is how to get CsvRow to 
return a single value in a row based on a headers value.

When I store a line in my CsvRow like this:

@fields = line.chomp.split(', ')

Is that an array or hash?

Using method_missing and it's an array will this work:

class CsvRow
  attr_reader :fields, :headersPattern

  def initialize(line)
    @fields = line.chomp.split(', ')
  end

  def headerPattern( pattern )
    @headersPattern = pattern
  end

  def self.method_missing name, *args
    @headersPattern.each_with_index |header, index|
      if header = name.to_s yield @fields.send(@headers[index])
    end
  end
end

Thanks again for your help, it really makes a difference knowing a 
language has a community of helpful people behind it :)

-- 
Posted via http://www.ruby-forum.com/.