lib/sample_cmdlet_patterns/commands/progress_bar_colorful.rb
def execute(input: $stdin, output: $stdout)
        prompt.ok('colorful progress bar')
        pastel = Pastel.new
        green  = pastel.on_green(" ")
        red    = pastel.on_red(" ")
        
        bar = TTY::ProgressBar.new("|:bar|",
          total: 30,
          complete: green,
          incomplete: red
        )

        30.times do
          sleep(0.1)
          bar.advance
        end

        :gui
      end
# Execute ProgressBarColorful subcommand taking input from
# a input stream and writing to output stream
#
# sample: output.puts 'OK'
Execute ProgressBarColorful subcommand taking input from
a input stream and writing to output stream


Execute ProgressBarColorful subcommand taking input from a input stream and writing to output stream
def execute(input: $stdin, output: $stdout)
        prompt.ok('colorful progress bar')
        pastel = Pastel.new
        green  = pastel.on_green(" ")
        red    = pastel.on_red(" ")
        bar = TTY::ProgressBar.new("|:bar|",
          total: 30,
          complete: green,
          incomplete: red
        )
        30.times do
          sleep(0.1)
          bar.advance
        end
        :gui
      end
def execute ( input : $stdin , output : $stdout ) prompt . ok ( 'colorful progress bar' ) pastel = Pastel . new green = pastel . on_green ( " " ) red = pastel . on_red ( " " ) bar = TTY :: ProgressBar . new ( "|:bar|" , total : 30 , complete : green , incomplete : red ) 30 . times do sleep ( 0.1 ) bar . advance end :gui end
Execute ProgressBarColorful subcommand taking input from
a input stream and writing to output stream
Execute ProgressBarColorful subcommand taking input from a input stream and writing to output stream
input
output