title: Options menu in Ruby
body: <p>I am trying to create a menu in Ruby so that depending on what a user inputs, depends on what class is called. Then afterwords it will return to the "Main" or the class "Options" in this case.</p>
  
  <p>I hope someone can help me. Here is my code.</p>
  
  <pre><code>module Physics
  G = 21
  C = 20000
  Pi = 3.14
  D = 100
  end
  
  class Options
  puts "Please select 1 for Acceleration and 2 for Energy."
  option = gets()
  if option == 1
  then
  puts "AccelCalc" # This is the bit that needs to direct the user to the class AccelCalc
  else
  puts "EnergyCalc" # This needs to take them to EnergyCalc.
  end
  end
  
  class AccelCalc
  include Physics
  puts "Please enter the mass of the object"
  M = gets()
  puts "The mass of the object is " + M + "."
  puts "Please enter the speed of the defined object."
  S = gets()
  puts "The speed of the object is set at " + S + "."
  puts "The acceleration will now be calculated."
  puts S.to_i*M.to_i
  end
  
  class EnergyCalc
  include Physics
  puts "This will use the function E=MC^2 to calculate the Energy."
  puts "Enter object mass"
  M = gets()
  puts "The mass is " + M + "."
  puts "Now calculating the Energy of the object."
  puts M.to_i*C_to.i**2
  end
  $end
  </code></pre>
  
  <p>I also would like to be able to after the class has been called to return to the clas Options. I'm sure this is easy, but I can't work it out.</p>
  
  <p>Thankyou again,</p>
  
  <p>Ross.</p>