El Gato wrote:

> I'm not sure if I'm missing something, but it appears that calling map() 
> on a DelegateClass still returns an Array object.  I guess I would need 
> map() and friends to return an InventoryReport class (i.e., Array 
> doesn't have a save method, whereas InventoryReport does, so calling 
> report.query.map {...}.save "/tmp/filename.xls" fails)

El Gato,

No, you didn't miss anything, your delegate class would return and 
InventoryReport on map() (on a side note, I dislike the re-usage of the 
"map" name for alternate functionality but that's another discussion) 
which would have the save() method.  The delegate pattern allows you to 
"intercept" selectively in order to accomplish the task at hand.


ilan



-- 
Posted via http://www.ruby-forum.com/.