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
23 24 25 |
# File 'lib/mutant/random.rb', line 23 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
33 34 35 |
# File 'lib/mutant/random.rb', line 33 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
13 14 15 |
# File 'lib/mutant/random.rb', line 13 def self.hex_string SecureRandom.hex(10) end |