Sha256: 32e3df70d2b4409cdbe220ec66cdbf16daa3e69fb415beb5415b324bd3040455

Contents?: true

Size: 938 Bytes

Versions: 1

Compression:

Stored size: 938 Bytes

Contents

require 'bundler/setup'
require 'spin_r'
require 'colorize'

def test_spinner(spinner, color, name)
  block = proc do
    sleep 1
    puts 'You spin my head right round! right round!'
    sleep 2
    puts 'When you go down!'
    sleep 3
    puts 'When you go down town!'
  end

  puts
  puts " ==> SpinR::Spinners::#{name} Spinner".green
  SpinR.spin(spinner, color, &block)
  puts
end

test_spinner SpinR::Spinners::TRADITIONAL, :black, 'TRADITIONAL'
test_spinner SpinR::Spinners::BLOCK,       :red, 'BLOCK'
test_spinner SpinR::Spinners::DOTTED_1,    :green, 'DOTTED_1'
test_spinner SpinR::Spinners::DOTTED_2,    :yellow, 'DOTTED_2'
test_spinner SpinR::Spinners::DOTTED_3,    :blue, 'DOTTED_3'
test_spinner SpinR::Spinners::DOTTED_4,    :magenta, 'DOTTED_4'
test_spinner SpinR::Spinners::WORLD,       :cyan, 'WORLD'
test_spinner SpinR::Spinners::TRIANGLE,    :white, 'TRIANGLE'
test_spinner SpinR::Spinners::EMOJI,       :white, 'EMOJI'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spin_r-1.0.2 demo.rb