summaryrefslogtreecommitdiff
path: root/fake-service/lib/smail/contact.rb
diff options
context:
space:
mode:
authorBruno Wagner Goncalves <bwagner@thoughtworks.com>2014-08-01 17:49:13 -0300
committerBruno Wagner Goncalves <bwagner@thoughtworks.com>2014-08-01 17:49:13 -0300
commitf52efae271ddb376e7223405c3a74edd7ed598b9 (patch)
treebf76c588086b93452457c71bdbfa6cee0206c81f /fake-service/lib/smail/contact.rb
parentd8360815ea07d9944f08ad378d2b89e64e1f2c9e (diff)
Changed names according to new convention on the fake service
Diffstat (limited to 'fake-service/lib/smail/contact.rb')
-rw-r--r--fake-service/lib/smail/contact.rb26
1 files changed, 0 insertions, 26 deletions
diff --git a/fake-service/lib/smail/contact.rb b/fake-service/lib/smail/contact.rb
deleted file mode 100644
index a07f0f84..00000000
--- a/fake-service/lib/smail/contact.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-
-module Smail
- class Contact < Struct.new(:ident, :name, :addresses, :mails_received, :mails_sent, :last_received, :last_sent, :prev, :next)
- include Comparable
-
- def to_json(*args)
- {
- ident: self.ident,
- name: self.name,
- addresses: Array(self.addresses),
- mails_received: self.mails_received || 0,
- mails_sent: self.mails_sent || 0,
- last_received: self.last_received,
- last_sent: self.last_sent
- }.to_json(*args)
- end
-
- def comparison_value
- [(self.mails_received || 0) + (self.mails_sent || 0) * 0.8, self.last_received, self.last_sent]
- end
-
- def <=>(other)
- other.comparison_value <=> self.comparison_value
- end
- end
-end