diff options
-rw-r--r-- | lib/keyringer/actions/recipients.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/keyringer/actions/recipients.rb b/lib/keyringer/actions/recipients.rb index 16b5a88..c5f30ed 100644 --- a/lib/keyringer/actions/recipients.rb +++ b/lib/keyringer/actions/recipients.rb @@ -1,15 +1,15 @@ module Keyringer
+ module Actions
class Recipients
def execute
- subCommand = ARGV[2]
- parameters = ARGV[3..-1]
+ subCommand = $args[0]
recipients = Keyring::Recipients.new
if subCommand == "add"
- recipients.addRecipient(ARGV[3], ARGV[4])
+ recipients.addRecipient($args[1], $args[2])
elsif subCommand == "remove"
- recipients.removeRecipient(ARGV[3])
+ recipients.removeRecipient($args[1])
elsif subCommand == "list"
recipients.listRecipients().each() do |recipient|
puts("#{recipient.email} #{recipient.keySignature}")
@@ -21,4 +21,5 @@ module Keyringer return ""
end
end
+ end
end
|