From: Rolf Pedersen Date: 2011-02-04T01:12:04+09:00 Subject: Setter method for Hash value --0015175cdab870e1b2049b62fe68 Content-Type: text/plain; charset=ISO-8859-1 Hi I guess there is a simple solution to this, but right now, I can't come up with it. I want to wrap two external functions to behave like a regular hash. class MyClass def props some_data = SomeClass::get_prop some_data.to_h end def props[key]=(value) # Not a valid construct SomeClass::set_prop(key, value) end end props["timeout"] =>"10" props["timeout"]="20" => nil Now, the getter method works perfectly, but I don't know how to declare the setter method :o( Anyone? Kind regards, Rolf --0015175cdab870e1b2049b62fe68--