Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A small library for generating and validating EAN-13's
branch: master
Failed to load latest commit information.
lib add bookland? method
pkg Initial commit
spec add bookland? method
CHANGELOG add bookland? method
MIT-LICENSE Initial commit
README.rdoc Initial commit
Rakefile make san an optional dependency

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.

Something went wrong with that request. Please try again.