Class | UUIDTools::UUID |
In: |
lib/uuidtools.rb
|
Parent: | Object |
UUIDTools was designed to be a simple library for generating any of the various types of UUIDs. It conforms to RFC 4122 whenever possible.
@example
UUID.md5_create(UUID_DNS_NAMESPACE, "www.widgets.com") # => #<UUID:0x287576 UUID:3d813cbb-47fb-32ba-91df-831e1593ac29> UUID.sha1_create(UUID_DNS_NAMESPACE, "www.widgets.com") # => #<UUID:0x2a0116 UUID:21f7f8de-8051-5b89-8680-0195ef798b6a> UUID.timestamp_create # => #<UUID:0x2adfdc UUID:64a5189c-25b3-11da-a97b-00c04fd430c8> UUID.random_create # => #<UUID:0x19013a UUID:984265dc-4200-4f02-ae70-fe4f48964159>
clock_seq_hi_and_reserved | [RW] | Returns the value of attribute `clock_seq_hi_and_reserved` |
clock_seq_low | [RW] | Returns the value of attribute `clock_seq_low` |
nodes | [RW] | Returns the value of attribute `nodes` |
time_hi_and_version | [RW] | Returns the value of attribute `time_hi_and_version` |
time_low | [RW] | Returns the value of attribute `time_low` |
time_mid | [RW] | Returns the value of attribute `time_mid` |
Returns the MAC address of the current computer‘s network card. Returns nil if a MAC address could not be found.
Allows users to set the MAC address manually in cases where the MAC address cannot be obtained programatically.
Creates a new UUID structure from its component values. @see UUID.md5_create @see UUID.sha1_create @see UUID.timestamp_create @see UUID.random_create @api private
Returns the IEEE 802 address used to generate this UUID or nil if a MAC address was not used.