Base62 monkeypatches Integer to add an Integer#base62_encode instance method to encode an integer in the character set of 0-9 + A-Z + a-z. It also monkeypatches String to add String#base62_decode to take the string and turn it back into a valid integer.
$ gem install base62
require 'base62' 123.base62_encode # => "1z" "funky".base62_decode # => 619367412
- Fork the project
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add feature')
- Push to the branch (
git push origin my-new-feature)
- Create new pull request
- Lasse Bunk for totally refactoring everything and bringing it into the modern age.
- Saadiq Rodgers-King for making it work with Ruby 1.9.
- Derrick Camerino for adding a Gemspec and prompting me to clean stuff up.