lib/daniel.rb
def uuid
      buffer = canonicalize_uuid random_bytes(16).bytes
      hex = buffer.map { |b| format('%02x', b) }.join
      [0..7, 8..11, 12..15, 16..19, 20..31].map { |r| hex[r] }.join('-')
    end
# Generate a random version 4 UUID.
Generate a random version 4 UUID.
Generate a random version 4 UUID .
def uuid
      buffer = canonicalize_uuid random_bytes(16).bytes
      hex = buffer.map { |b| format('%02x', b) }.join
      [0..7, 8..11, 12..15, 16..19, 20..31].map { |r| hex[r] }.join('-')
    end
def uuid buffer = canonicalize_uuid random_bytes ( 16 ) . bytes hex = buffer . map { | b | format ( '%02x' , b ) } . join [ 0 .. 7 , 8 .. 11 , 12 .. 15 , 16 .. 19 , 20 .. 31 ] . map { | r | hex [ r ] } . join ( '-' ) end
Generate a random version 4 UUID.
Generate a random version 4 UUID .