title: How do I write shell-like scripts using Ruby?
body: <p>I have a task of writing a simple Ruby script which would do the following. </p>
  
  <p>Upon execution from the UNIX command line, it would present the user with a prompt at which he should be able to run certain commands, like "<code>dir</code>", "<code>help</code>" or "<code>exit</code>". Upon "<code>exit</code>" the user should return to the Unix shell.</p>
  
  <p>I'm not asking for the solution; I would just like to know how this "shell" functionality can be implemented in Ruby. How do you present the user with a prompt and interpret commands.</p>
  
  <p>I do not need a CLI script that takes arguments. I need something that creates a shell interface.</p>