File: README.md

package info (click to toggle)
ruby-uuidtools 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 240 kB
  • sloc: ruby: 1,284; makefile: 16
file content (37 lines) | stat: -rw-r--r-- 1,207 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[![Build Status](https://secure.travis-ci.org/sporkmonger/uuidtools.svg)](http://travis-ci.org/sporkmonger/uuidtools)

# UUIDTools

<dl>
  <dt>Homepage</dt><dd><a href="https://github.com/sporkmonger/uuidtools">sporkmonger/uuidtools</a></dd>
  <dt>Author</dt><dd><a href="mailto:bob@sporkmonger.com">Bob Aman</a></dd>
  <dt>Copyright</dt><dd>Copyright © 2005-2014 Bob Aman</dd>
  <dt>License</dt><dd>Apache 2.0</dd>
</dl>

# Description

UUIDTools was designed to be a simple library for generating any
of the various types of UUIDs.  It conforms to RFC 4122 whenever
possible.

# Reference

- {UUIDTools::UUID}

# Example usage

    require "uuidtools"

    UUIDTools::UUID.md5_create(UUIDTools::UUID_DNS_NAMESPACE, "www.widgets.com")
    # => #<UUID:0x287576 UUID:3d813cbb-47fb-32ba-91df-831e1593ac29>
    UUIDTools::UUID.sha1_create(UUIDTools::UUID_DNS_NAMESPACE, "www.widgets.com")
    # => #<UUID:0x2a0116 UUID:21f7f8de-8051-5b89-8680-0195ef798b6a>
    UUIDTools::UUID.timestamp_create
    # => #<UUID:0x2adfdc UUID:64a5189c-25b3-11da-a97b-00c04fd430c8>
    UUIDTools::UUID.random_create
    # => #<UUID:0x19013a UUID:984265dc-4200-4f02-ae70-fe4f48964159>

# Install

    $ sudo gem install uuidtools