A small library for generating and validating EAN-13's
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
pkg Initial commit Oct 22, 2008
spec add bookland? method Jul 11, 2009
CHANGELOG
MIT-LICENSE
README.rdoc Initial commit Oct 22, 2008
Rakefile make san an optional dependency Feb 24, 2009

README.rdoc

A small class for generating and validating EAN-13's, the 13 digit codes found on many products sold around the world.

Installation

gem install ean13

Usage

EAN13.new("0632737715836").valid?
=> true

EAN13.valid?("0632737715836")
=> true

EAN13.valid?("0632737715837")
=> false

EAN13.complete("063273771583")
=> "0632737715836"

EAN13.new("0632737715836").to_upc
=> "632737715836"

EAN13.new("0632737715836").to_gtin
=> "00632737715836"

Further Reader

Contributing

Source code is publicly available @ github.com/yob/ean13/tree/master. Patches welcome, preferably via a git repo I can pull from.