joeljunstrom/ruby_luhn — pull request #3 by nigelramsay (2013-11-16 00:49:14+00:00)
Title: Add support for non-numeric checksums

Hi Joel,

I wanted to create a checksum character for some non-numeric strings. I found the Luhn Mod N algorithm on Wikipedia, and have applied it to your project. I have tried to follow a similar approach to what you've done with Swedish CivicNumber class.

Here's the algorithm, which is very similar to the Luhn algorithm.

http://en.wikipedia.org/wiki/Luhn_mod_N_algorithm

I think the "Luhn Mod N" class (and specs) would be a useful addition to your gem.

Cheers,

Nigel