User Tools

Site Tools


at:tutorial:reflection

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
at:tutorial:reflection [2007/10/25 19:09] – slot tvcutsemat:tutorial:reflection [2008/06/23 15:08] – * tvcutsem
Line 52: Line 52:
 >def runTest(obj) { >def runTest(obj) {
    retainTestMethods(obj).each: { | meth |     retainTestMethods(obj).each: { | meth | 
-     (reflect: obj).invoke(obj, meth.name, []) } };+     (reflect: obj).invoke(obj, `(.#(meth.name)())) } };
 >><closure:runTest> >><closure:runTest>
 >runTest(object: {def testOne() { system.println(`ok) } }); >runTest(object: {def testOne() { system.println(`ok) } });
at/tutorial/reflection.txt · Last modified: 2010/11/16 16:32 by tvcutsem