]> gitweb.michael.orlitzky.com - mailshears.git/commitdiff
Allow sorting of User/Domain for testing.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 4 Nov 2015 23:13:41 +0000 (18:13 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 4 Nov 2015 23:13:41 +0000 (18:13 -0500)
lib/common/domain.rb
lib/common/user.rb

index 5fb345bb2f779f642dbb7254f4d078fe1745d536..ec4fecf35ee579cda7be81abbf8e50a9ec6f2ce5 100644 (file)
@@ -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
index bb239d13400473b30e15408c63149cc2a8b103e8..f67d0443da1180fa2b9ffc3778542b0e0feb8bf4 100644 (file)
@@ -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