search for: processkey

Displaying 1 result from an estimated 1 matches for "processkey".

Did you mean: process_key
2009 May 18
0
how to monkeypatch Hash's = method, revisted
...q=+how+to+monkeypatch+Hash%27s+%5B%5D%3D+method+#58b80fe0d4eadb1a But while reading, and admittedly not quite getting the solution, I had a bright moment to balance out the stupid moment, realising that [] = already has an alias to which you can delegate: class Hash def []= key, value store processKey(key), processValue(value) end end Hope it helps