I’ve been having a lot of fun with jruby in my java app, but so far
I’ve just been calling jruby, which kind of manages my my java app
like it’s a library. It’s given me pretty fast feedback for minor
tweaks. Now, however, I’d like to send parameters to ruby functions.
I’ve seen examples using put() to set the java object in the
ScriptEngine and then reference that function, but I was just curious
if there was a way to call it directly.
In java
engine.eval(“foo()”, arg1, arg2)
and in jruby
def foo(arg1, arg2)
…
end