Method: Inspec::UI#prompt
- Defined in:
- lib/inspec/ui.rb
#prompt ⇒ Object
This simply returns a TTY::Prompt object, gated on interactivity being enabled.
203 204 205 206 207 208 209 210 211 |
# File 'lib/inspec/ui.rb', line 203 def prompt unless interactive? raise Inspec::UserInteractionRequired, "Somthing is trying to ask the user a question, but interactivity is disabled." end require "tty-prompt" @prompt ||= TTY::Prompt.new end |