New to Ruby; need some help

I am still working with console apps and do not see myself moving away
from command line any time in the near future. However with one of
the apps I am working on, I need something that writes the time in the
bottom right hand corner and updates it every 1 second.
This is the box below (I hope this works lol).


| C:\Ruby P.s> ruby Test.rb |
| Enter Number Here: 1
|
| Display stuff
Here |
|
|
|
|
|
7:22:42 PM |
|______________________________________________|

Basically something that looks like that.

I know some C++ and Java, but all the apps I write for those are
GUIā€¦ so frankly, I have no idea what to call what I am looking for,
so Google is not much help :frowning:

Thanks for all the help,
Chris Mays

Chris Mays wrote:

one of
the apps I am working on, I need something that writes the time in the
bottom right hand corner and updates it every 1 second.

Chris,
Two libraries come to mind: ruby-ncurses and highline. I presume from
your C:\ that you are on a Windows platform, so you would have to
download the ncurses source code separately to install the gem, if you
go that route. Someone with more Windows experience might be able to
chime in if you need more info there. The ruby implementation of ncurses
is known (last I heard) to be a bit incomplete, however.

Anyway, have a look at the rdocs and see if either might suite your
needs:

http://allgems.ruby-forum.com/gems/doc/highline/1.5.1
http://allgems.ruby-forum.com/gems/doc/ncurses/0.9.1

HTH,
Howard