diff options
author | Zapata <zapata@xs4all.nl> | 2011-01-29 22:13:05 +0100 |
---|---|---|
committer | Zapata <zapata@xs4all.nl> | 2011-01-29 22:13:05 +0100 |
commit | e65dbf59bf3aaa0b4bde29ca49ca67f7ad17b5a9 (patch) | |
tree | cd914b8c588ea35f732abdbd7336d3c459804b70 /lib/keyring | |
parent | 7382be9d83bc5f95ad8d184b95c379ca5b9d1725 (diff) | |
download | keyringer-e65dbf59bf3aaa0b4bde29ca49ca67f7ad17b5a9.tar.gz keyringer-e65dbf59bf3aaa0b4bde29ca49ca67f7ad17b5a9.tar.bz2 |
added preliminary recipient management functionality
Diffstat (limited to 'lib/keyring')
-rw-r--r-- | lib/keyring/recipients.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/keyring/recipients.rb b/lib/keyring/recipients.rb new file mode 100644 index 0000000..4cd9a48 --- /dev/null +++ b/lib/keyring/recipients.rb @@ -0,0 +1,26 @@ +module Keyring
+ class Recipients
+ def initialize(aBaseDirectory = '..')
+ @recipientsStore = Backend::RecipientsStore.new(aBaseDirectory)
+
+ end
+ def addRecipient(anEmail, aKeySignature)
+
+ @recipientsStore.load()
+ @recipientsStore.addRecipient(anEmail, aKeySignature)
+ @recipientsStore.save()
+ end
+
+ def removeRecipient(aKeySignature)
+ @recipientsStore.load()
+ @recipientsStore.removeRecipient(aKeySignature)
+ @recipientsStore.save()
+ end
+
+ def listRecipients()
+ @recipientsStore.load()
+
+ return @recipientsStore.getRecipients()
+ end
+ end
+end
|