Module Net::SSH::PromptMethods::Clear
In: lib/net/ssh/prompt.rb
lib/net/ssh/prompt.rb

Defines the prompt method to use when neither Highline nor Termios are installed.

Methods

prompt   prompt  

Public Instance methods

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.

[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

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.

[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

[Validate]