I have been posting a topic on the Rails forum but it might not be the
right area to post.  Therefore, I believe my issue might be more related
to Ruby and procedural matters with Rake.

To make things as clear as possible, I've pasted some sandbox code here:

http://pastie.org/549855

The issues that I'm trying to concentrate on are located within the rake
task around lines 17-20, and also in the StatModel class around lines
71-86.

The basic procedural breakdown of this code is as follows:

Rake Task is performed.
Rake Task opens a new object with StatModel
Rake Task calls method calculate_rating on StatModel
StatModel method responds by pulling data from TableModel class
StatModel open a new object with MathClass
MathClass looks over the dataset and returns the following:
  min, max, mean, standard deviation, and floor values
  - these values continue to persist...
StatModel calls a new method on MathClass to calculate ratings
MathClass takes persistant data and dataset and calculates ratings
MathClass returns foreignkey for TableModel along with Rating
StatModel sends returned data back to Rake
Rake Task now has all data in its hands to do what it pleases with.
-- STUCK --

How do I send all data returned back to StatModel.table_update and how
does table_update save this data..

The code will show you everything that applies to this situation.  The
routine works pretty smoothly.  I'm just stuck with how to iterate over
all of the data returned, categorizing it by the foreign_keys and saving
all data as a combined dataset to the StatModel table...

See the puts example for what rake sees when the values are returned..
-- 
Posted via http://www.ruby-forum.com/.