Included comparable and added <=> method.
This commit is contained in:
parent
2f242227ae
commit
761b125687
|
@ -19,6 +19,8 @@ module XGen
|
|||
module Driver
|
||||
|
||||
class ObjectID
|
||||
|
||||
include Comparable
|
||||
|
||||
UUID_STRING_LENGTH = 24
|
||||
|
||||
|
@ -37,6 +39,10 @@ module XGen
|
|||
def to_s
|
||||
@uuid
|
||||
end
|
||||
|
||||
def <=>(other)
|
||||
to_s <=> other.to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue