If you want to use Pruner outside of the shell command, it has some subtle issues.
You could call prune() more than once, but it maintains a class-level analyzed count and @categories that it doesn't clear. This is fine for how it's used by the command-line interface, but it could trip up someone who chooses to use Pruner programatically.
I'm not sure that anyone else is ever likely to use Pruner, but it would be nice to fix from an aesthetic point of view.
If you want to use Pruner outside of the shell command, it has some subtle issues.
You could call prune() more than once, but it maintains a class-level analyzed count and @categories that it doesn't clear. This is fine for how it's used by the command-line interface, but it could trip up someone who chooses to use Pruner programatically.
I'm not sure that anyone else is ever likely to use Pruner, but it would be nice to fix from an aesthetic point of view.