lib/poc_sample_commands/commands/prompt_keypress.rb
# Execute PromptKeypress subcommand taking input from a input stream
# and writing to output stream
#
# sample: output.puts 'OK'
Execute PromptKeypress subcommand taking input from a input stream
and writing to output stream


Execute PromptKeypress subcommand taking input from a input stream and writing to output stream
def execute(input: $stdin, output: $stdout)
        prompt = TTY::Prompt.new
        prompt.keypress("Press key ?")
        prompt.keypress("Press space or enter to continue", keys: [:space, :return])
        prompt.keypress("Press any key to continue, resumes automatically in 3 seconds ...", timeout: 3)
        prompt.keypress("Press any key to continue, resumes automatically in :countdown ...", timeout: 3)
        return :gui
      end
def execute ( input : $stdin , output : $stdout ) prompt = TTY :: Prompt . new prompt . keypress ( "Press key ?" ) prompt . keypress ( "Press space or enter to continue" , keys : [ :space , :return ] ) prompt . keypress ( "Press any key to continue, resumes automatically in 3 seconds ..." , timeout : 3 ) prompt . keypress ( "Press any key to continue, resumes automatically in :countdown ..." , timeout : 3 ) return :gui end
Execute PromptKeypress subcommand taking input from a input stream
and writing to output stream
Execute PromptKeypress subcommand taking input from a input stream and writing to output stream
input
<not_specific>
output
<not_specific>