Sha256: 5bee78cd68863768d2444c762749d55b37070097a0762f54a4e4ff2ceead4d8c
Contents?: true
Size: 496 Bytes
Versions: 2
Compression:
Stored size: 496 Bytes
Contents
module Faker module Russian module Kpp def kpp(options = {}) options.assert_valid_keys(:sequence_number, :region_number) sequence = find_sequence(options[:sequence_number]) region_number = find_region_number(options[:region_number], sequence, :region_numbers) region_number + two_region_numbers(sequence) + '01001' end private def two_region_numbers(sequence) sprintf '%02d', sequence.rand(100) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
faker-russian-0.0.6 | lib/faker/russian/kpp.rb |
faker-russian-0.0.5 | lib/faker/russian/kpp.rb |