gets command help --ruby

G

Govinda Khanal

hi there, i am a learner of ruby and while i am writing a code i am
stopped with input method. i search and found that gets is the command
use to input from keyboard but i do not know how? so can you explain
me on detail of gets and its member command.



thank you very much for your help
 
S

Stefano Crocco

|hi there, i am a learner of ruby and while i am writing a code i am
|stopped with input method. i search and found that gets is the command
|use to input from keyboard but i do not know how? so can you explain
|me on detail of gets and its member command.
|
|
|
|thank you very much for your help
|

You can start with something like this:

puts "insert any text"
res = gets

You can find more information about gets using the ri program:

ri Kernel.gets

Stefano
 
D

David Masover

hi there, i am a learner of ruby and while i am writing a code i am
stopped with input method. i search and found that gets is the command
use to input from keyboard but i do not know how?

How what?

How to get input from the keyboard? How to use gets?
so can you explain
me on detail of gets

http://lmgtfy.com/?q=ruby+gets&l=1

Did you really search that hard? The very first Google result I found is a
tutorial that walks you through using gets, step by step, complete with
screenshots!
and its member command.

I have never, ever heard the term "member command", nor can I think of any
reasonable situation where something could be both a member, and a command.

So again I have to ask, what do you mean?
 

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
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top