diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-01-29 19:57:58 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-01-29 19:57:58 -0200 |
commit | 4d4df2e46f9fde08ca73fe809f7e87379602f78f (patch) | |
tree | 545014212f32968589bef827f4b94df0b3510b96 /lib/keyringer/actions/recipients.rb | |
parent | 5d0ae3722c6889fff8c00018066662260a71f3e2 (diff) | |
parent | ce02d9f01ca366be945caf286c0b77f8eaab24d1 (diff) | |
download | keyringer-4d4df2e46f9fde08ca73fe809f7e87379602f78f.tar.gz keyringer-4d4df2e46f9fde08ca73fe809f7e87379602f78f.tar.bz2 |
Merge commit 'origin/ruby' into ruby
Diffstat (limited to 'lib/keyringer/actions/recipients.rb')
-rw-r--r-- | lib/keyringer/actions/recipients.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/keyringer/actions/recipients.rb b/lib/keyringer/actions/recipients.rb new file mode 100644 index 0000000..c5f30ed --- /dev/null +++ b/lib/keyringer/actions/recipients.rb @@ -0,0 +1,25 @@ +module Keyringer
+ module Actions
+ class Recipients
+ def execute
+ subCommand = $args[0]
+
+ recipients = Keyring::Recipients.new
+
+ if subCommand == "add"
+ recipients.addRecipient($args[1], $args[2])
+ elsif subCommand == "remove"
+ recipients.removeRecipient($args[1])
+ elsif subCommand == "list"
+ recipients.listRecipients().each() do |recipient|
+ puts("#{recipient.email} #{recipient.keySignature}")
+ end
+ else
+ throw "Invalid recipients command: #{subCommand} "
+ end
+
+ return ""
+ end
+ end
+ end
+end
|