Module: Mutant::Random
- Defined in:
- lib/mutant/random.rb
Overview
Module for generating random values
Class Method Summary collapse
-
.fixnum ⇒ Fixnum
private
Return random fixnum.
-
.float ⇒ Float
private
Return random float.
-
.hex_string ⇒ String
private
Return random hex string.
Class Method Details
.fixnum ⇒ Fixnum
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return random fixnum
21 22 23 |
# File 'lib/mutant/random.rb', line 21 def self.fixnum ::Random.rand(1000) end |
.float ⇒ Float
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return random float
31 32 33 |
# File 'lib/mutant/random.rb', line 31 def self.float ::Random.rand end |
.hex_string ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return random hex string
11 12 13 |
# File 'lib/mutant/random.rb', line 11 def self.hex_string SecureRandom.hex(10) end |