Module: Net::SSH::PromptMethods::Highline

Defined in:
lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/prompt.rb

Overview

Defines the prompt method to use if the Highline library is installed.

Instance Method Summary collapse

Instance Method Details

#prompt(prompt, echo = true) ⇒ Object

Uses Highline#ask to present a prompt and accept input. If echo is false, the characters entered by the user will not be echoed to the screen.



16
17
18
19
# File 'lib/tpkg/thirdparty/net-ssh-2.1.0/lib/net/ssh/prompt.rb', line 16

def prompt(prompt, echo=true)
  @highline ||= ::HighLine.new
  @highline.ask(prompt + " ") { |q| q.echo = echo }
end