class Kodo::Algorithms::Random
Constants
- DEFAULT_LENGTH
Public Instance Methods
create()
click to toggle source
# File lib/kodo/algorithms/random.rb, line 6 def create if @max_length.nil? @max_length = DEFAULT_LENGTH end for i in 1..@count do rnd_array = [] for l in 1..@max_length do rnd_array << ('0'..'z').to_a.shuffle.first(1).join end puts rnd_array.join end end