Class: Factor::CLI::CredentialTask

Inherits:
Command
  • Object
show all
Defined in:
lib/cli/credential_task.rb

Instance Method Summary collapse

Instance Method Details

#list(key = "") ⇒ Object

method_option :key, :alias=>“-k”, :type=>:string, :desc=>“key reference”



10
11
12
# File 'lib/cli/credential_task.rb', line 10

def list(key="")
  puts @client.get_credential(key)["value"]
end

#remove(key) ⇒ Object



22
23
24
# File 'lib/cli/credential_task.rb', line 22

def remove(key)
  puts @client.remove_credential(key)
end

#set(key, value) ⇒ Object

method_option :key, :alias=>“-k”, :type=>:string, :desc=>“key reference” method_option :value, :alias=>“-v”, :type=>:string, :desc=>“values”



17
18
19
# File 'lib/cli/credential_task.rb', line 17

def set(key,value)
  puts @client.set_credential(key,value)
end