Sha256: 550f432ac99037dec53eecfa04fbb83e28170f77c869856f10fbb08958204f5d
Contents?: true
Size: 392 Bytes
Versions: 14
Compression:
Stored size: 392 Bytes
Contents
module Faker module Amazon class << self def asin raw = 9.times.map { rand(10).to_s } (raw << Bookland::ISBN.new.send(:check_digit_10, raw)).join end def ean Bookland::ISBN.to_13(asin) end def merchant_id seed = ('A'..'Z').to_a + (0..9).to_a 14.times.map { seed[rand(seed.size)] }.join end end end end
Version data entries
14 entries across 14 versions & 2 rubygems