evaluateOn

fun evaluateOn(receiver: Any, script: String): Any?

Executes the selected script on the receiver object. The receiver will be available as this throughout the script.

Note that the script can contain import statements. Use import or importAll instead to reuse them in future scripts.


fun evaluateOn(receiver: Any, scriptFile: FileHandle): Any?

Executes the selected scriptFile on the receiver object. The receiver will be available as this throughout the script.

Note that the script can contain import statements. Use import or importAll instead to reuse them in future scripts.