3 ms·
the example in the op was somewhat misleading in that he was extending the object within its initialize method. i think you'd more often want to do a per-object
by zem 14y ago
the example in the op was somewhat misleading in that he was extending the object within its initialize method. i think you'd more often want to do a per-object extend dynamically at runtime to simulate something like smalltalk's #become, where the object would be modifying its capabilities and 'type' based on some external input conditions.