Small library for recognising and validating ISTC numbers
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
lib
spec
CHANGELOG
MIT-LICENSE
README.rdoc
Rakefile

README.rdoc

A small class for generating and validating Internation Standard Text Codes (ISTC).

Installation

gem install istc

Usage

ISTC.new("0A9200800000007C").valid?
=> true

ISTC.valid?("0A9200800000007C")
=> true

ISTC.valid?("0A9200800000007B")
=> false

ISTC.complete("0A9200800000007")
=> "0A9200800000007C"

ISTC.new("0A9200800000007").to_s
=> "0A9-2008-00000007-C"

Further Reading

Contributing

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