Method: RandomOrg.uuid
- Defined in:
- lib/random_org.rb
.uuid ⇒ Object
RandomOrg.uuid generates a v4 random UUID (Universally Unique IDentifier).
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.
119 120 121 122 123 |
# File 'lib/random_org.rb', line 119 def self.uuid req = RandomOrg::ApiClient.build_request(:generate_uuids, n: 1) response = RandomOrg::ApiClient.perform_request(req) response['result']['random']['data'].first end |