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


Execute PromptSlider subcommand taking input from a input stream and writing to output stream
def execute(input: $stdin, output: $stdout)
        prompt = TTY::Prompt.new
        prompt.slider('Volume', max: 100, step: 5)
        prompt.slider('Volume', max: 100, step: 5, default: 75)
        prompt.slider('Volume', max: 100, step: 5, default: 75, format: "|:slider| [%4d]")
        prompt.slider("Volume", max: 10, step: 0.5, default: 5, format: "|:slider| %.1f")
        prompt.slider("Volume", max: 100, step: 5, default: 75, symbols: {bullet: 'x', line: '_'})
        return :gui
      end
def execute ( input : $stdin , output : $stdout ) prompt = TTY :: Prompt . new prompt . slider ( 'Volume' , max : 100 , step : 5 ) prompt . slider ( 'Volume' , max : 100 , step : 5 , default : 75 ) prompt . slider ( 'Volume' , max : 100 , step : 5 , default : 75 , format : "|:slider| [%4d]" ) prompt . slider ( "Volume" , max : 10 , step : 0.5 , default : 5 , format : "|:slider| %.1f" ) prompt . slider ( "Volume" , max : 100 , step : 5 , default : 75 , symbols : { bullet : 'x' , line : '_' } ) return :gui end
Execute PromptSlider subcommand taking input from a input stream
and writing to output stream
Execute PromptSlider subcommand taking input from a input stream and writing to output stream
# NOT WORKING # prompt.slider('What size?') do |range| #   range.max 100 #   range.step 5 #   range.default 75 #   range.format "|:slider| %d%" # end
input
<not_specific>
output
<not_specific>