Last active
June 14, 2020 19:20
-
-
Save andronedev/e9d66801d499072cce0dfa29800060b3 to your computer and use it in GitHub Desktop.
Progress bar ruby | Démo : https://progressbar.andronedev.repl.run/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Progressbar in ruby | |
def progress(value, maxvalue) | |
return ' 0% |' + ('+' * ((value * 70) / maxvalue)) + ('-' * (70 - (value * 70) / maxvalue) + '| 100% ') | |
end | |
#demo : | |
puts progress(10,33) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment