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


Execute SpinnerMulti subcommand taking input from a input stream and writing to output stream
def execute(input: $stdin, output: $stdout)
        spinners = TTY::Spinner::Multi.new('[:spinner] top')
        sp1 = spinners.register '[:spinner] one'
        sp2 = spinners.register '[:spinner] two'
        sp1.auto_spin
        sp2.auto_spin
        sleep(2) 
        sp1.success
        sp2.success
        :gui
      end
def execute ( input : $stdin , output : $stdout ) spinners = TTY :: Spinner :: Multi . new ( '[:spinner] top' ) sp1 = spinners . register '[:spinner] one' sp2 = spinners . register '[:spinner] two' sp1 . auto_spin sp2 . auto_spin sleep ( 2 ) sp1 . success sp2 . success :gui end
Execute SpinnerMulti subcommand taking input from
a input stream and writing to output stream
Execute SpinnerMulti subcommand taking input from a input stream and writing to output stream
# or sp1 = ::TTY::Spinner.new('[:spinner] one') # Perform work
input
output