class Obfuscator::Utilities

Public Class Methods

random_boolean() click to toggle source
# File lib/obfuscator/utilities.rb, line 8
def random_boolean
  [true, false].sample
end
random_date() click to toggle source
# File lib/obfuscator/utilities.rb, line 12
def random_date
  month, day, year = rand(12) + 1, rand(28) + 1, (1980..2012).to_a.sample

  Date.parse("#{day}/#{month}/#{year}")
end
random_number(limit) click to toggle source
# File lib/obfuscator/utilities.rb, line 4
def random_number(limit)
  rand(limit)
end