Sha256: 80d49f25e84e4c33dffc9baf113c394b55b91e192377d99b12ab1cdc37674f69

Contents?: true

Size: 200 Bytes

Versions: 8

Compression:

Stored size: 200 Bytes

Contents

module Telesignature
  module Helpers
    def random_with_N_digits n
      range_start = 10 ** (n - 1)
      range_end = (10 ** n) - 1
      Random.new.rand(range_start...range_end)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
telesignature-0.0.9 lib/telesignature/helpers.rb
telesignature-0.0.8 lib/telesignature/helpers.rb
telesignature-0.0.7 lib/telesignature/helpers.rb
telesignature-0.0.6 lib/telesignature/helpers.rb
telesignature-0.0.5 lib/telesignature/helpers.rb
telesignature-0.0.4 lib/telesignature/helpers.rb
telesignature-0.0.3 lib/telesignature/helpers.rb
telesignature-0.0.2 lib/telesignature/helpers.rb