I need to know if one function does excist.

  • Thread starter Helgitomas Gislason
  • Start date
H

Helgitomas Gislason

Hey all!

I was making a program and then one thing popped in my mind: Is there a
function in Ruby that gives you the chance of that when somebody is
running the program and it stands 'Press any button to continue' that he
could press any button, the 'Press any button to continue' would
disappear and the program would start?
 
H

Helgitomas Gislason

This is a highland program or something, I want to know if I can use
ruby without installing any update to it.
 
M

Martin DeMello

This is a highland program or something, I want to know if I can use
ruby without installing any update to it.

There's the ruby/ncurses module which ships with ruby. require
'curses' to use it, and the function you're looking for is
Curses.getch(). Documentation seems to be a bit sparse, though.

martin
 
R

Robert Dober

This is a highland program or something, I want to know if I can use
ruby without installing any update to it.

This problem is not a trivial one, I fail to know if Highline is a
pure Ruby module in which case you can study the relevant parts of
Highline to learn how to do it, but it might be that the functionality
you are looking for is a C-extension.

I feel that you should just use Highline in the later case, just my micromoney.

HAND
R.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,234
Messages
2,571,180
Members
47,813
Latest member
RustyGary3

Latest Threads

Top