Class: Faker::Code
Constant Summary
Constants inherited from Base
Base::Letters, Base::Numbers, Base::ULetters
Class Method Summary collapse
-
.isbn(base = 10) ⇒ Object
By default generates 10 sign isbn code in format 123456789-X You can pass 13 to generate new 13 sign code.
Methods inherited from Base
bothify, fetch, flexible, letterify, method_missing, numerify, parse, regexify, translate
Class Method Details
.isbn(base = 10) ⇒ Object
By default generates 10 sign isbn code in format 123456789-X You can pass 13 to generate new 13 sign code
6 7 8 |
# File 'lib/faker/code.rb', line 6 def isbn(base = 10) base == 13 ? generate_base13_isbn : generate_base10_isbn end |