Sha256: 988d2a2466a0f52bbc8dd8e017728c8921871b5af3834303b5f153cb5783abb2
Contents?: true
Size: 479 Bytes
Versions: 1
Compression:
Stored size: 479 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_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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
faker-russian-0.0.4 | lib/faker/russian/kpp.rb |