#!/usr/bin/ruby

#
## http://rosettacode.org/wiki/Send_an_unknown_method_call
#

class Example {
    method foo(x) {
        42 + x;
    }
}
 
var name = 'foo';
var obj = Example();
say obj.(name)(5);      # prints: 47
