Welcome To Snipplr

Everyone's Recent Ruby Snippets Tagged number

« Prev 1 Next »
Scales a number from a given range into a specific range, as explained [in this Stack Overflow](http://stackoverflow.com/questions/5294955/how-to-scale-down-a-range-of-numbers-with-a-known-min-and-max-value) post. Just call it, for example like:...
0 219 posted 8 years ago by slhck
Probably not the most elegant solution, but it works. Needed this for a capistrano deploy task which shows the most recent tagged releases in my repository. Very bare bones, and needs tweaking if your versions are not in X.X.X.X format.
1 154 posted 11 years ago by bananastalktome
« Prev 1 Next »