simple-spinner/examples/pavyon.cr

13 lines
244 B
Crystal
Raw Normal View History

2015-12-30 11:55:14 +00:00
require "../src/spinner"
require "colorize"
colors = [:red, :light_red, :yellow, :green, :light_blue, :blue, :magenta]
2015-12-30 11:55:14 +00:00
chars = colors.map do |color|
".xXx.".colorize(color).to_s
2015-12-30 11:55:14 +00:00
end
spin = Spin.new(0.01, chars)
spin.start
sleep 3
spin.stop