Anonymous user
Send an unknown method call: Difference between revisions
Added groovy version
(→{{header|Lasso}}: Adding Lasso example) |
(Added groovy version) |
||
Line 119:
fmt.Println(r[0].Int()) // => 42
}</lang>
=={{header|Groovy}}==
<lang grrovy>class Example {
def foo(value) {
"Invoked with '$value'"
}
}
def example = new Example()
def method = "foo"
def arg = "test value"
assert "Invoked with 'test value'" == example."$method"(arg)</lang>
==Icon and {{header|Unicon}}==
|