module Burocracia::Generator
Overview
Module responsible for generating randomic low-level information
Extended Modules
Defined in:
burocracia/generator.crInstance Method Summary
-
#random_numbers(size, randomifier = Random)
Generates a string with random numbers.
Instance Method Detail
def random_numbers(size, randomifier = Random)
#
Generates a string with random numbers.
Burocracia::Generator.random_numbers(size: 3)
=> "139"
If needed, you can pass your own Random
instance:
Burocracia::Generator.random_numbers(size: 5, randomifier: MyRandomClass)
=> "002"
NOTE The randomifier class or module must implement a function called rand
that accepts a Range
and returns an Object
with a to_s
method.