Sha256: 17e90ba4f8a93c1bceeaeafe12d3d5247d77dfa908e8ff08c53b3afec55c07c6

Contents?: true

Size: 372 Bytes

Versions: 2

Compression:

Stored size: 372 Bytes

Contents

module Faker
  module Russian
    module Rs
      def rs(options = {})
        options.assert_valid_keys(:sequence_number, :okv)

        sequence = find_sequence(options[:sequence_number])
        okv_digits = find_okv(options[:okv], sequence)

        ('%05d' % sequence.rand(100_000)) + okv_digits + ('%012d' % sequence.rand(1_000_000_000))
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
faker-russian-0.0.6 lib/faker/russian/rs.rb
faker-russian-0.0.5 lib/faker/russian/rs.rb