lib/poc_sample_commands/commands/prompt.rb
# Execute Prompt command taking input from a input stream
# and writing to output stream
#
# sample: output.puts 'OK'
Execute Prompt command taking input from a input stream
and writing to output stream


Execute Prompt command taking input from a input stream and writing to output stream
def execute(input: $stdin, output: $stdout)
        case @subcommand
        when :gui
          gui
        when :all
          require_relative 'prompt_all'
          subcmd = PocSampleCommands::Commands::PromptAll.new({})
        when :multi_select
          require_relative 'prompt_multi_select'
          subcmd = PocSampleCommands::Commands::PromptMultiSelect.new({})
        when :collect
          require_relative 'prompt_collect'
          subcmd = PocSampleCommands::Commands::PromptCollect.new({})
        when :validation
          require_relative 'prompt_validation'
          subcmd = PocSampleCommands::Commands::PromptValidation.new({})
        when :keypress
          require_relative 'prompt_keypress'
          subcmd = PocSampleCommands::Commands::PromptKeypress.new({})
        when :multi_line
          require_relative 'prompt_multi_line'
          subcmd = PocSampleCommands::Commands::PromptMultiLine.new({})
        when :bool
          require_relative 'prompt_bool'
          subcmd = PocSampleCommands::Commands::PromptBool.new({})
        when :menu
          require_relative 'prompt_menu'
          subcmd = PocSampleCommands::Commands::PromptMenu.new({})
        when :expand
          require_relative 'prompt_expand'
          subcmd = PocSampleCommands::Commands::PromptExpand.new({})
        when :say
          require_relative 'prompt_say'
          subcmd = PocSampleCommands::Commands::PromptSay.new({})
        when :suggest
          require_relative 'prompt_suggest'
          subcmd = PocSampleCommands::Commands::PromptSuggest.new({})
        when :slider
          require_relative 'prompt_slider'
          subcmd = PocSampleCommands::Commands::PromptSlider.new({})
        end
        subcmd.execute(input: input, output: output) if subcmd
      end
def execute ( input : $stdin , output : $stdout ) case @subcommand when :gui gui when :all require_relative 'prompt_all' subcmd = PocSampleCommands :: Commands :: PromptAll . new ( { } ) when :multi_select require_relative 'prompt_multi_select' subcmd = PocSampleCommands :: Commands :: PromptMultiSelect . new ( { } ) when :collect require_relative 'prompt_collect' subcmd = PocSampleCommands :: Commands :: PromptCollect . new ( { } ) when :validation require_relative 'prompt_validation' subcmd = PocSampleCommands :: Commands :: PromptValidation . new ( { } ) when :keypress require_relative 'prompt_keypress' subcmd = PocSampleCommands :: Commands :: PromptKeypress . new ( { } ) when :multi_line require_relative 'prompt_multi_line' subcmd = PocSampleCommands :: Commands :: PromptMultiLine . new ( { } ) when :bool require_relative 'prompt_bool' subcmd = PocSampleCommands :: Commands :: PromptBool . new ( { } ) when :menu require_relative 'prompt_menu' subcmd = PocSampleCommands :: Commands :: PromptMenu . new ( { } ) when :expand require_relative 'prompt_expand' subcmd = PocSampleCommands :: Commands :: PromptExpand . new ( { } ) when :say require_relative 'prompt_say' subcmd = PocSampleCommands :: Commands :: PromptSay . new ( { } ) when :suggest require_relative 'prompt_suggest' subcmd = PocSampleCommands :: Commands :: PromptSuggest . new ( { } ) when :slider require_relative 'prompt_slider' subcmd = PocSampleCommands :: Commands :: PromptSlider . new ( { } ) end subcmd . execute ( input : input , output : output ) if subcmd end
Execute Prompt command taking input from a input stream
and writing to output stream
Execute Prompt command taking input from a input stream and writing to output stream
input
<not_specific>
output
<not_specific>