Prompt Menu in Ruby
<p>I'm trying to create a simple prompt menu in Ruby. I'm not expert in Ruby but I'm trying to code something similar to the prompt menu in others languages like C/C++ but my code isn't working right, I'm geting a infinity loop on the user input and isn't calling the function.</p>

<p>Heres my code: </p>

<pre><code>begin
  puts "Option 1"
  puts "Option 2"
  puts "Option 3"
  puts ""
  command = gets.chomp

    loop do   
    case command
    when 1
      functionname(arg1, arg2)
    when 2
      functionname2(arg1, arg2)
    end

    end
end
</code></pre>

<p>Please, someone can help me? </p>