Skip to content
/ ruby Public

Fast and simple in-place implementation of the luhn (mod 10) algorithm in Ruby.

License

Notifications You must be signed in to change notification settings

luhnmod10/ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Luhn (Mod 10)

Build Status

A fast and simple in-place implementation of the luhn check algorithm in Ruby. Implementations in other languages can be found at github.com/luhnmod10.

Usage

Install the gem:

gem install luhnmod10

Or add to the Gemfile:

gem "luhnmod10"

Then:

require "luhnmod10"
Luhnmod10.valid?("4242424242424242")

Contributing

Contributions are welcome! If you can improve the execution time of this implementation without increasing its complexity, please open a pull request. To test your change, run make in the repository to run the tests and the benchmarks.

About

Fast and simple in-place implementation of the luhn (mod 10) algorithm in Ruby.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages