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


Execute SpinnerInBlock subcommand taking input from a input stream and writing to output stream
def execute(input: $stdin, output: $stdout)
        spinner = TTY::Spinner.new
        spinner.run('Done!') do |spinner|
          puts 'running some long code'
          sleep(3)
        end
        :gui
      end
def execute ( input : $stdin , output : $stdout ) spinner = TTY :: Spinner . new spinner . run ( 'Done!' ) do | spinner | puts 'running some long code' sleep ( 3 ) end :gui end
Execute SpinnerInBlock subcommand taking input from
a input stream and writing to output stream
Execute SpinnerInBlock subcommand taking input from a input stream and writing to output stream
input
output