The values only go one way, a bit like variables declared in a block are only visible within that block. So you could think of these script sections as being a call to a groovy block or a javascript block.
I think it could be possible to have the results come back out into the *same* variables though...hmmm.
Cool! Do values go the other way, too? (e.g. JS to JRuby) And what types are supported?
ReplyDeleteThe values only go one way, a bit like variables declared in a block are only visible within that block. So you could think of these script sections as being a call to a groovy block or a javascript block.
ReplyDeleteI think it could be possible to have the results come back out into the *same* variables though...hmmm.
I assume this is using the Java 6 scripting API?
ReplyDeleteReally nice. But if it could go both ways it would be awesome.
ReplyDeleteYou can improve the Groovy example with:
ReplyDeleteprintln "$x, $y $z"
now this is really really amazing!
ReplyDeleteThanks for the nice post!
ReplyDelete