Sha256: fcbede79ea9d4f690105135230bdba8050113782346524ab101eeaf8f96cb396

Contents?: true

Size: 505 Bytes

Versions: 5

Compression:

Stored size: 505 Bytes

Contents

module Mutant
  # Module for generating random values
  module Random
    # Return random hex string
    #
    # @return [String]
    #
    # @api private
    #
    def self.hex_string
      SecureRandom.hex(10)
    end

    # Return random fixnum
    #
    # @return [Fixnum]
    #
    # @api private
    #
    def self.fixnum
      ::Random.rand(1000)
    end

    # Return random float
    #
    # @return [Float]
    #
    # @api private
    #
    def self.float
      ::Random.rand
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mutant-0.2.4 lib/mutant/random.rb
mutant-0.2.3 lib/mutant/random.rb
mutant-0.2.2 lib/mutant/random.rb
mutant-0.2.1 lib/mutant/random.rb
mutant-0.2.0 lib/mutant/random.rb