Public instance methods
prompt
(prompt, echo=true)
Displays the prompt to $stdout and pulls the response from $stdin. Text is always echoed in the clear, regardless of the echo setting. The first time a prompt is given and echo is false, a warning will be written to $stderr recommending that either Highline or Termios be installed.
[show source]
# File lib/net/ssh/prompt.rb, line 64 64: def prompt(prompt, echo=true) 65: @seen_warning ||= false 66: if !echo && !@seen_warning 67: $stderr.puts "Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text." 68: @seen_warning = true 69: end 70: 71: $stdout.print(prompt) 72: $stdout.flush 73: $stdin.gets.chomp 74: end