evaluateOn
fun evaluateOn(receiver: Any, script: String, receiverVariableName: String = getRandomReceiverName())
Executes the selected script on the receiver object. The receiver will be available as this
throughout the script, as well as under the value of receiverVariableName. If no variable name is given, it will be chosen randomly.
Note that the script cannot contain any import statement, or it will fail with a ScriptEngineException. Use import or importAll instead.
fun evaluateOn(receiver: Any, scriptFile: FileHandle, receiverVariableName: String = getRandomReceiverName())
Executes the selected scriptFile on the receiver object. The receiver will be available as this
throughout the script, as well as under the value of receiverVariableName. If no variable name is given, it will be chosen randomly.
Note that the script cannot contain any import statement, or it will fail with a ScriptEngineException. Use import or importAll instead.