From: "T. Onoma" Date: 2003-12-08T12:16:19+09:00 Subject: Re: Underpinnings of Method Wrapping On Sunday 07 December 2003 08:02 pm, Peter wrote: > > As always, I may be over looking the obvious. But if anyone has a current > > workable solution I would be most grateful. > > class Recipe > def construct_chroot ... end > def deconstruct_chroot ... end > def compile > construct_chroot() > real_compile > deconstruct_chroot() > end > end > > class SpecialRecipe < Recipe > def real_compile > ... # special compile code > end > end > > Just a simple template design pattern. The only catch is that you can't > put the special compile code in a method called compile. (I mentioned > before that the kind of wrapping you use here can be done using > subroutines, but wrapping allows it to do in-place, remember that?) Yep. I recall. Template Design Pattern. Didn't know that it had a name. Well, it's what I did, as I don't think there is better way to do it at this point. Thanks Peter. > I'm busy catching up now with reading/understanding the wrapping stuff. I > still need to find that example for cflow, but that's for tomorrow when I > pickup the notes (if I don't forget). When I find something interesting, > I'll let you know. It's all good. I have lots of stuff on my plate right now. I'll just keep touching back on this as it developes in my mind. Have started some rework on the wiki page. T.