lib/sample_cmdlet_patterns/commands/progress_bar_simple.rb
# Execute ProgressBarSimple subcommand taking input from
# a input stream and writing to output stream
#
# sample: output.puts 'OK'
Execute ProgressBarSimple subcommand taking input from
a input stream and writing to output stream


Execute ProgressBarSimple subcommand taking input from a input stream and writing to output stream
def execute(input: $stdin, output: $stdout)
        prompt.ok('simple progress bar')
        bar = TTY::ProgressBar.new("downloading [:bar]", total: 30)
        30.times do
          sleep(0.1)
          bar.advance(1)
        end
        :gui
      end
def execute ( input : $stdin , output : $stdout ) prompt . ok ( 'simple progress bar' ) bar = TTY :: ProgressBar . new ( "downloading [:bar]" , total : 30 ) 30 . times do sleep ( 0.1 ) bar . advance ( 1 ) end :gui end
Execute ProgressBarSimple subcommand taking input from
a input stream and writing to output stream
Execute ProgressBarSimple subcommand taking input from a input stream and writing to output stream
input
output