From: Magicloud Magiclouds on 10 Jan 2008 00:23 Hello, Array under .net has some event on content changing. How to do monitor like this in ruby? Thanks.
From: Paul Stickney on 10 Jan 2008 00:28 You could proxy (via a true proxy or singletons or whatnot) for MOST operations.
From: Clifford Heath on 10 Jan 2008 18:04 Magicloud Magiclouds wrote: > Array under .net has some event on content changing. How to do monitor > like this in ruby? gem install chattr allows you to define an array class having a type-checking function that contains the hook you want. You can probably ven replace the regular Array class with your new one. In any case, all the mutating methods of Array make their calls through the type-check block, so you have what you need. Clifford Heath.
|
Pages: 1 Prev: Get your hands dirty: Help bootstrap Ruby on Windows. Next: installing rjb in centos |