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


Execute SpinnerGoodBad subcommand taking input from a input stream and writing to output stream
def execute(input: $stdin, output: $stdout)
        spinner = TTY::Spinner.new('[:spinner] Task name')
        spinner.auto_spin
        sleep(1)
        spinner.success('(successful)')
        spinner = TTY::Spinner.new('[:spinner] Task name')
        spinner.auto_spin
        sleep(1)
        spinner.error('(error)')
        :gui
      end
def execute ( input : $stdin , output : $stdout ) spinner = TTY :: Spinner . new ( '[:spinner] Task name' ) spinner . auto_spin sleep ( 1 ) spinner . success ( '(successful)' ) spinner = TTY :: Spinner . new ( '[:spinner] Task name' ) spinner . auto_spin sleep ( 1 ) spinner . error ( '(error)' ) :gui end
Execute SpinnerGoodBad subcommand taking input from
a input stream and writing to output stream
Execute SpinnerGoodBad subcommand taking input from a input stream and writing to output stream
input
output