Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove progress after 100% complete #194

Closed
deyman12 opened this issue Mar 1, 2024 · 1 comment
Closed

Remove progress after 100% complete #194

deyman12 opened this issue Mar 1, 2024 · 1 comment

Comments

@deyman12
Copy link

deyman12 commented Mar 1, 2024

i thought this was a duplicate, in issue #173, but when i added :autofinish => true, it didn't work at all. so, are there any other options to clean up the progress when it's already completed to 100%?

Screenshot from 2024-03-01 19-58-51

the simple code:

require "ruby-progressbar"

p = ProgressBar.create(
  :total => 10,
  :format => "%a %b\u{15E7}%i %p%% %t",
  :progress_mark => ' ',
  :remainder_mark => "\u{FF65}",
  :autofinish => true
)

10.times {
  p.increment
  sleep 0.1
}

regards!

@jfelchner
Copy link
Owner

@deyman12 you can set autofinish to false and then call p.clear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants