Sha256: d00cc235370d0bcf92cd354cc84c2e3d336982ad829f769610e279e34a654736

Contents?: true

Size: 430 Bytes

Versions: 2

Compression:

Stored size: 430 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_region_number(options[:okato_region_number], sequence, :okato_region_numbers)

        '04' + okato_region_number + sprintf("%06d", sequence.rand(1_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/bik.rb
faker-russian-0.0.5 lib/faker/russian/bik.rb