class RandomGenerator

Public Instance Methods

number_up_to(max) click to toggle source
# File lib/grammoire/util/random_generator.rb, line 2
def number_up_to(max)
  rand(max)
end
one_of(options) click to toggle source
# File lib/grammoire/util/random_generator.rb, line 6
def one_of(options)
  options[number_up_to(options.size)]
end