Sha256: 41a4d665ac477459cd720bd7c71791379a6482eb747cd9a988afcd7810fb5b38
Contents?: true
Size: 654 Bytes
Versions: 1
Compression:
Stored size: 654 Bytes
Contents
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'cli_spinnable' class Foo include CliSpinnable def call 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 end end Foo.new.call
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cli_spinnable-0.1 | examples/example1.rb |