Re: Dynamic Variable Names

From: Chris M. [mailto:[email protected]]

Is it possible to create dynamic variable names in ruby?

See #instance_variable_set, #instance_variable_get. However, as others
have said…use a Hash.

Also search the mailing list. This has come up before.

On 12/15/06, Gavin K. [email protected] wrote:

From: Chris M. [mailto:[email protected]]

Is it possible to create dynamic variable names in ruby?

See #instance_variable_set, #instance_variable_get. However, as others have said…use a Hash.

Also search the mailing list. This has come up before.

Thanks all!
Steve, that’s basically the idea.

Gavin, this is what I was looking for but couldn’t find, thanks for
the push in the right direction.