I kind of did the same thing here in the Mockable mixin: https://github.com/nomad-software/dunit Instead of wrapping i simply extended the target class so i have access to 'super.bar()'. Then i can add the specialisation code and/or call the original method too.

Hmm i never considered inheritance actually...
(I'm to used to the decorator pattern i guess ^^,
 Normally i only inherit from interfaces and decorate)

But now that you pointed it out it's a perfect fit!
Thanks for the help.

Reply via email to