WpUsers::Detectable specs

This commit is contained in:
erwanlr
2013-03-30 16:33:39 +01:00
parent 07e5a532c1
commit 21f5acf62f
3 changed files with 82 additions and 8 deletions

View File

@@ -18,6 +18,14 @@ class WpUser < WpItem
end
end
# @return [ String ]
def to_s
s = "#{id}"
s += " | #{login}" if login
s += " | #{display_name}" if display_name
s
end
# @param [ WpUser ] other
def <=>(other)
id <=> other.id