Pharo is too much fun!

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Pharo is too much fun!

Sean P. DeNigris
Administrator
The problem with Pharo is sometimes it's too much fun to play with objects. I could've just renamed my 5 classes via copy/paste, but I couldn't resist...
classes := Smalltalk organization classesInCategory: packageName.
classes do: [ :cls | | newName |
        newName := newPrefix, (cls name allButFirst: oldPrefix size).
        (RBRenameClassRefactoring rename: cls to: newName) execute ]
Cheers,
Sean