method

uuid

Importance_1
Ruby latest stable (v2_5_5) - 0 notes - Class: SecureRandom

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2_2_9) is shown here.

These similar methods exist in v2_5_5:

uuid() public

SecureRandom.uuid generates a v4 random UUID (Universally Unique IDentifier).

p SecureRandom.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594"
p SecureRandom.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab"
p SecureRandom.uuid #=> "62936e70-1815-439b-bf89-8492855a7e6b"

The version 4 UUID is purely random (except the version). It doesn’t contain meaningful information such as MAC address, time, etc.

See RFC 4122 for details of UUID.

Show source
Register or log in to add new notes.