Imagine I have a text with some Kotlin code, which operates on variable
How can I run this code?
I. e. I mean following:
val kotlinCode:String = ... // kotlinCode contains the script to execute val executor:KotlinCodeExecutor = KotlinCodeExecutor() executor.bindings["a"] = someObject executor.bindings["b"] = anotherObject exeutor.run(kotlinCode)
AFAIR you can do this in BeanShell and Java version of Ruby.
Is it possible to do this with Kotlin?
Thanks in advance