Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Crystal termial/cli loading animation
require "colorize"
arr_loading = ["", "", "", "", "", "", "", "", "", ""]
i = 0
loop do
print "#{arr_loading[i % arr_loading.size]}\r".colorize(:light_magenta)
i += 1
sleep(0.1)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment