Sha256: 40c07617de950cb903fb94ff258a9f9cf4e9650d13f9e2c53fd88667bc1e3991

Contents?: true

Size: 523 Bytes

Versions: 1

Compression:

Stored size: 523 Bytes

Contents

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

require 'cli_spinnable'

include CliSpinnable

puts 'HAPPY RUN (ending with success):'
with_spinner do |cli|
  cli.print 'Downloading something'
  sleep 1
  cli.print '...downloaded 1MB'
  cli.tick
  cli.print 'Processing data'
  sleep 1
  cli.tick
end

puts 'SAD RUN (ending with fail):'
with_spinner do |cli|
  cli.print 'Downloading something'
  sleep 1
  cli.print '...downloaded 1MB'
  cli.tick
  cli.print 'Processing data'
  sleep 1
  1 / 0
  cli.tick
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cli_spinnable-0.1 examples/example3.rb