----- Original Message ----- 
From: "Anders Bengtsson" <ndrsbngtssn / yahoo.se>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Thursday, October 17, 2002 1:14 PM
Subject: Re: Hashes v.s. Classes (was Re: Strings or symbols?)


> You can get the names of all instance variables of an object with
> obj.instance_variables, so you could write something similar to the
> above.
> If you have everything in a Person class you can also let that class
> know about the table structure the instances are stored in, so the
> objects can store themselves even.

True. Two other possibilities:
1. Give your class a to_hash method (maybe
   from_hash also)
2. Use a Struct

Hal