Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.1 KB

README.md

File metadata and controls

39 lines (23 loc) · 1.1 KB

IsbnTools gem


Running the tests

rake test

Hyphenizing

irb> require 'hypenizer'

irb> hyp = IsbnsTools::Hyphenizer.new

irb> hyp.Hyphenize("9783635266942")

=> 978-3-635-26694-2

Faking an Isbn

irb> require 'faker'

irb> faker = IsbnsTools::Faker.new

irb> faker.fake_isbn()

=> 978-3-635-26694-2

irb> faker.fake_isbn(start: 9783, range: 635)

=> 978-3-635-26694-2

NOTE: Since this gem reads the official isbn XML definition, the internet connection is required in order to test and run it.