Hi Chris,

Try this:

...
class MyClass
        def mymethod
                puts "mymethod called!"
        end

        def myothermethod
                puts "myothermethod called!"
        end
end


input = gets.downcase.chomp;
myinstance=MyClass.new;
myinstance.send(input.to_sym);
...

So use the 'send' method of your instance to invoke the method - first 
convert the inputted string to a symbol. Wow..you gotta love Ruby for 
stuff like this....:)

Cheers

John
-- 
Posted via http://www.ruby-forum.com/.