Source code of a method.

TheFlyingFiddle theflyingfiddle at gmail.com
Sat Oct 26 15:56:19 PDT 2013


> 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.


More information about the Digitalmars-d-learn mailing list