Class: Obfuscator::Utilities
- Inherits:
-
Object
- Object
- Obfuscator::Utilities
- Defined in:
- lib/obfuscator/utilities.rb
Class Method Summary collapse
Class Method Details
.random_boolean ⇒ Object
8 9 10 |
# File 'lib/obfuscator/utilities.rb', line 8 def random_boolean [true, false].sample end |
.random_date ⇒ Object
12 13 14 15 16 |
# 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) ⇒ Object
4 5 6 |
# File 'lib/obfuscator/utilities.rb', line 4 def random_number(limit) rand(limit) end |