lundi 16 janvier 2017

Refactoring methods and creating copies with a different name in Pharo Smalltalk?

I am experimenting with refactoring and some custom functionality. Is there a way to copy a method to the same class as the original but under a new name? (essentially creating a really shallow copy) You can do this by hand by editing the method source, but can it be done programatically?

For example:

doMethodName: anArgument
^ anObject doThat with: anArgument

becomes:

doNewMethodName: anArgument
^ anObject doThat with: anArgument





Aucun commentaire:

Enregistrer un commentaire