Read From Console In Ruby: STDIN.gets
Join the DZone community and get the full member experience.Join For Free
To read a line from console in ruby use
getsreads a line from file specified by 1st parameter:
c:\Windows>ruby -e 'puts gets' win.ini ; for 16-bit app support
Console (video game CLI)
Opinions expressed by DZone contributors are their own.