# 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 Ruby.

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 Ruby.

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.

Update

ProgressBar class was unbelievably straight-forward, flawlessly addressed my trouble.

0
2019-05-04 00:34:16
Source Share

You could be able to get some execution suggestions from the Ruby/ProgressBar library, which creates message progression bars. I came across it a number of months back yet have not made any kind of use it.

0
2019-05-07 19:37:29
Source

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.

0
2019-05-07 17:53:47
Source

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 : )

0
2019-05-07 17:50:07
Source