Project

mod_10

0.0
No commit activity in last 3 years
No release in over 3 years
# Mod10 A simple gem to generate mod_10 check digits and check if integers are mod10 valid. ## Installation Add this line to your application's Gemfile: ```ruby gem 'mod_10' ``` And then execute: $ bundle Or install it yourself as: $ gem install mod_10 ## Usage Include the Mod10 module to make the following two methods available - generate_check_digit(value) Which returns an integer value for the mod10 check digit of a string or integer. Note: If the value is 0, then the argument was already mod10 valid. - is_mod10?(value) Returns true or false for the tested value is it is or isn't mod10 valid. ## Contributing 1. Fork it ( https://github.com/[my-github-username]/mod_10/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.7
~> 10.0
 Project Readme

Mod10

A simple gem to generate mod_10 check digits and check if integers are mod10 valid.

Installation

Add this line to your application's Gemfile:

gem 'mod_10'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mod_10

Usage

Include the Mod10 module to make the following two methods available

  • generate_check_digit(value) Which returns an integer value for the mod10 check digit of a string or integer. Note: If the value is 0, then the argument was already mod10 valid.

  • is_mod10?(value) Returns true or false for the tested value is it is or isn't mod10 valid.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/mod_10/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request