Luhnar
Implementation of Luhn algorithm for computing checkdigits.
Installation
Add this line to your application's Gemfile:
gem 'luhnar'
And then execute:
$ bundle
Or install it yourself as:
$ gem install luhnar
Usage
require 'luhnar'
Luhnar.compute('8900123456789012345')
# or
Luhnar.compute(8900123456789012345)
# return 6
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request