From: Ryan Davis Date: 2007-01-20T03:06:25+09:00 Subject: Re: Declaring instance variables dynamically On Jan 19, 2007, at 9:55 AM, Alex Schearer wrote: > Coming from PHP I want to take a class say, > > class User > @name > end > > And call it: > u = User.new > > And then add a second class variable previously not declared: > u.mood = "happy" > > PHP being what it is, it let you declare public class variables in > that > manner. Is there a way to acheive the same in Ruby? ri OpenStruct