geoffreywiseman / prune

A simple utility for pruning files based on date as a means of keeping increasingly sparse backups.
http://geoffreywiseman.github.com/prune
The Unlicense
2 stars 0 forks source link

Support Pruner Re-Use #13

Open geoffreywiseman opened 13 years ago

geoffreywiseman commented 13 years ago

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.