lib/sample_cmdlet_patterns/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: '_' })
        :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 : '_' } ) :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
input
output