Module: Ciql::UUID
- Defined in:
- lib/ciql/uuid.rb
Class Method Summary collapse
-
.ending(time) ⇒ SimpleUUID::UUID
Create a fake time UUID that sorts as the largest for a timestamp.
-
.starting(time) ⇒ SimpleUUID::UUID
Create a fake time UUID that sorts as the smallest for a timestamp.
Class Method Details
.ending(time) ⇒ SimpleUUID::UUID
Create a fake time UUID that sorts as the largest for a timestamp
20 21 22 |
# File 'lib/ciql/uuid.rb', line 20 def self.ending(time) create_uuid((time.stamp + 1) * 10 - 1, 0x7f7f7f7f7f7f7f7f) end |
.starting(time) ⇒ SimpleUUID::UUID
Create a fake time UUID that sorts as the smallest for a timestamp
11 12 13 |
# File 'lib/ciql/uuid.rb', line 11 def self.starting(time) create_uuid(time.stamp * 10, 0x8080808080808080) end |