From 30e96ed6093c479e7605b23a68aba7da11297679 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 4 Nov 2015 18:13:41 -0500 Subject: [PATCH] Allow sorting of User/Domain for testing. --- lib/common/domain.rb | 4 ++++ lib/common/user.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/common/domain.rb b/lib/common/domain.rb index 5fb345b..ec4fecf 100644 --- a/lib/common/domain.rb +++ b/lib/common/domain.rb @@ -20,4 +20,8 @@ class Domain def ==(other) return self.to_s() == other.to_s() end + + def <=>(other) + return self.to_s() <=> other.to_s() + end end diff --git a/lib/common/user.rb b/lib/common/user.rb index bb239d1..f67d044 100644 --- a/lib/common/user.rb +++ b/lib/common/user.rb @@ -60,4 +60,8 @@ class User def ==(other) return self.to_s() == other.to_s() end + + def <=>(other) + return self.to_s() <=> other.to_s() + end end -- 2.43.2