Class: UUIDTools::UUID

Inherits:
Object
  • Object
show all
Defined in:
lib/helpers/uuid.rb

Overview

Extendes the UUID class, adding the ability to generate sequential UUID’s

Instance Method Summary collapse

Instance Method Details

#nextObject

Increments the internal UUID representation, returning a new UUID that is different from, but greater, than the current sequence number



27
28
29
30
31
32
33
# File 'lib/helpers/uuid.rb', line 27

def next
  next_uuid = self.to_i
  next_uuid += 1
  
  # Return the newly created UUID
  return UUIDTools::UUID::parse_int(next_uuid)
end