Just how do I make use of (n) curses in Ruby?
I would certainly such as to create a progression bar to show the standing of an a set work in
I've read some tutorials/ libraries on making use of (n) curses, none of which were specifically handy in clarifying just how to create an " computer animated" progression bar in the terminal or making use of curses with
I'm currently knowledgeable about making use of a different string to check the progression of an offered work, I'm simply not exactly sure just how to wage attracting a progression bar.
ProgressBar class was unbelievably straight-forward, flawlessly addressed my trouble.
On windows, curses functions out of package, ncurses does not, and also for a progression bar curses need to suffice. So, make use of curses as opposed to ncurses.
Additionally, both curses and also ncurses are paper wrappers around the c collection - that suggests you do not actually require Ruby-specific tutorials.
Nonetheless, on the site for the PickAxe you can download and install all the code instances for guide. The documents "ex1423.rb" has a curses trial which plays Pong - that need to offer you a lot of product to get you going.
Personally I assume curses is excessive in this instance. While menstruations lib behaves (and also I regularly utilize it myself ) it's a PITA to relearn every single time I have not required it for 12 months which needs to be the indicator of a negative user interface layout.
If for one reason or another you can not move on with the progress bar lib Joey suggested roll your very own and also release it under a rather free permit for instantaneous congratulations : )