Sha256: 76a23788457951a4cbd574cb1e2b59ece1788cd8c543ca1dac388a47b4ba1937
Contents?: true
Size: 232 Bytes
Versions: 2
Compression:
Stored size: 232 Bytes
Contents
require 'securerandom' module Kamerling module UUID module_function def [] bin bin.unpack('H8H4H4H4H12').join '-' end def bin uuid [uuid.tr('-', '')].pack 'H*' end def new SecureRandom.uuid end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kamerling-0.0.2 | lib/kamerling/uuid.rb |
kamerling-0.0.1 | lib/kamerling/uuid.rb |