Class: Shh::Command::SetKey
- Inherits:
-
Object
- Object
- Shh::Command::SetKey
show all
- Includes:
- KeyCommand
- Defined in:
- lib/shh/command/set_key.rb
Instance Method Summary
collapse
Methods included from KeyCommand
#completion, #initialize, #usage
Instance Method Details
#execute(key = nil) ⇒ Object
10
11
12
13
|
# File 'lib/shh/command/set_key.rb', line 10
def execute key=nil
new_value = @io.ask("Enter new value for #{key}", :silent => (key =~ /pass/))
@entry[key] = new_value if new_value.length > 0
end
|
#help ⇒ Object
6
7
8
|
# File 'lib/shh/command/set_key.rb', line 6
def help
"Prompts for a new value for the specified key\nKeys with a name including 'pass' (eg. password, passphrase) will not echo input"
end
|