Sha256: 114424b5a9af436f36da2b7fa652953566efce55f62f2520bf73844f0dcf8556

Contents?: true

Size: 413 Bytes

Versions: 1

Compression:

Stored size: 413 Bytes

Contents

module Faker
  module Russian
    module Bik
      def bik(options = {})
        options.assert_valid_keys(:sequence_number, :okato_region_number)

        sequence = find_sequence(options[:sequence_number])
        okato_region_number = find_okato_region_number(options[:okato_region_number], sequence)

        '04' + okato_region_number + sprintf("%06d", sequence.rand(1_000_000))
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
faker-russian-0.0.4 lib/faker/russian/bik.rb