Sha256: 4c55d63148c78c43da01f58407e7d870c626844251d55ac461757d6b294b59be

Contents?: true

Size: 1.1 KB

Versions: 4

Compression:

Stored size: 1.1 KB

Contents

require_relative '../lib/whirly'
require 'paint'

# Lightning talk at EuRuKo 2016

# # # Whirly

print "\033c"
puts Paint["Whirly", :underline]

Whirly.start status: 'Generating something huge…' do
  sleep 15
  Whirly.status = "(actually it's just `sleep 15`)"
  sleep 15
  Whirly.status = "Almost done…"
  sleep 3
  Whirly.status = "10 more seconds!"
  sleep 10
end

puts
puts
puts
puts "Done"
sleep 5

# # # Earth

print "\033c"
puts Paint["Earth Spinner", :underline]

Whirly.start spinner: "earth"
Whirly.status = "Travelling…"
sleep 9
Whirly.stop

puts
puts
puts
puts "Done"
sleep 5

# # # Pong Game

print "\033c"
puts Paint["Pong", :underline]

Whirly.start spinner: "pong", use_color: false, status: "Two computers in a game of Pong" do
  sleep 9
end

puts
puts
puts
puts "Done"
sleep 5

# # # Ticking Clock

print "\033c"
puts Paint["Clock", :underline]

Whirly.start spinner: "clock", interval: 1000 do
  sleep 12
end

puts
puts
puts
puts "Time is over"

# # # URL

print "\033c"
puts Paint["Get WHIRLY", :bold]

Whirly.start spinner: "whirly", status: "https://github.com/janlelis/whirly" do
  sleep 60
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
whirly-0.2.3 examples/euruko.rb
whirly-0.2.2 examples/euruko.rb
whirly-0.2.1 examples/euruko.rb
whirly-0.2.0 examples/euruko.rb