Hi Chris,

I agree with you that it is probably pushing Structs too far.  As I do not
know much about database, in my opinion probably it is better to rephrase
your question to the group in a more direct way, such as the best way to
store a database record in Ruby and adding a method for each record.  If
you have a specific database, probably some Ruby dbi is already available,
which will make your job even easier.

Regards,

Bill
===========================================================================
Chris Morris <chrismo / clabs.org> wrote:
> In my real code, I had a struct that represented a database row with several
> fields. I know it's not much more work (esp. with a good editor) to go from
> this:

(deleted)

> But the point for me is still the surprise of not having an instance var
> inside a Struct (although it does make sense that this is probably pushing
> Structs beyond their intended use).