From: Rolf Pedersen Date: 2011-02-04T03:52:26+09:00 Subject: Re: Setter method for Hash value --001636832066303449049b6544fa Content-Type: text/plain; charset=ISO-8859-1 Hi Brian (and others who have contributed with suggestions along the same line) It's not the class MyClass that I'd like to behave like a Hash. I'm trying to make getter and setter methods for a virtual hash property called props. Under the hood, the implementation calls external methods to retrieve or store the given values for a given key. Kind regards, -Rolf On Thu, Feb 3, 2011 at 7:24 PM, Brian Candler wrote: > Rolf Pedersen wrote in post #979431: > > > def props[key]=(value) # Not a valid construct > > def []=(key,value) > > > props["timeout"]="20" > > => nil > > foo = MyClass.new > foo["timeout"]="20" > > -- > Posted via http://www.ruby-forum.com/. > > --001636832066303449049b6544fa--