Skip to content

IncSow/Ruby-Light-LoadingBar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

LoadingBar in ruby

How to use :

call LoadingBar.output in each of the iterations of your program

Output takes two arguments : The current progression and the total progression.

If you have already calculated your completion rate (in %), you can simply print LoadingBar.output_string(completion_rate)

Exemple use :

start = 0
51.times do 
	# Using print is very important! Do not use p or puts !
	print(LoadingBar.output(start, 50))
	sleep(0.1)
	start +=1
end

About

Small loading bar I've been using on most of my scripts. Decided that it would be better to keep it here!

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages