transfusion[m] has joined #jruby
<transfusion[m]> hi all, i'm new to jruby, trying to figure out whether it fits my need (i don't know ruby)
<transfusion[m]> i want to make a java wrapper for a gem (this one in particular <>)
<transfusion[m]> - i want to expose the returned metadata as POJOs, etc.
<transfusion[m]> - it reads files of a certain format from the filesystem, unpacks them and returns certain metadata, nothing complicated
<transfusion[m]> i'm reading some tutorials on jruby and some of them are about accessing Java APIs from within Ruby (opposite of what i wanna do), and also `ScriptEngine.eval`, which i'm not sure is the only way to interact with Ruby?
<headius> Hello there!
<headius> Calling from Java to Ruby is a bit less straightforward than Ruby to Java but there are some quick ways
<headius> The best way would be to create a Java interface or interfaces that represent the API you want to expose, and then implement that in Ruby code. You could then use ScriptEngine to eval code to create an instance of that type and use it from Java normally
adam12 has left #jruby [The Lounge -]