aboutsummaryrefslogtreecommitdiff
path: root/lib/keyring/recipients.rb
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-01-29 19:57:58 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-01-29 19:57:58 -0200
commit4d4df2e46f9fde08ca73fe809f7e87379602f78f (patch)
tree545014212f32968589bef827f4b94df0b3510b96 /lib/keyring/recipients.rb
parent5d0ae3722c6889fff8c00018066662260a71f3e2 (diff)
parentce02d9f01ca366be945caf286c0b77f8eaab24d1 (diff)
downloadkeyringer-4d4df2e46f9fde08ca73fe809f7e87379602f78f.tar.gz
keyringer-4d4df2e46f9fde08ca73fe809f7e87379602f78f.tar.bz2
Merge commit 'origin/ruby' into ruby
Diffstat (limited to 'lib/keyring/recipients.rb')
-rw-r--r--lib/keyring/recipients.rb26
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