summaryrefslogtreecommitdiff
path: root/lib/nickserver/email_address.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nickserver/email_address.rb')
-rw-r--r--lib/nickserver/email_address.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/nickserver/email_address.rb b/lib/nickserver/email_address.rb
index 2b3f2c2..c5d5df7 100644
--- a/lib/nickserver/email_address.rb
+++ b/lib/nickserver/email_address.rb
@@ -30,7 +30,11 @@ module Nickserver
end
def domain?(domain)
- address.end_with? "@#{domain}"
+ domain == self.domain
+ end
+
+ def domain
+ address.split('@')[1]
end
def to_s