diff options
author | Azul <azul@leap.se> | 2013-01-17 15:09:58 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-01-17 15:16:53 +0100 |
commit | a8ec73a0307924610023525786bb3a9eb8b173e1 (patch) | |
tree | 16d937bfea4d18a39aad1eec86edfd4f6467d708 /users/app/models/remote_email.rb | |
parent | 7f7ba4f3d72104d67e9ecf839c9688c0580d4063 (diff) |
unit tests passing
Diffstat (limited to 'users/app/models/remote_email.rb')
-rw-r--r-- | users/app/models/remote_email.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/users/app/models/remote_email.rb b/users/app/models/remote_email.rb new file mode 100644 index 0000000..4fe7425 --- /dev/null +++ b/users/app/models/remote_email.rb @@ -0,0 +1,14 @@ +class RemoteEmail + include CouchRest::Model::Embeddable + include Email + + property :email, String + + def username + email.spilt('@').first + end + + def domain + email.split('@').last + end +end |