If I have a Ruby script executed by ScriptingContainer of JRuby in my Java application, is the Ruby script capable of accessing or making use of a class I have defined in my Java application if I haven't shared anything with the script?
By sharing this is what I mean:
ruby = new ScriptingContainer(LocalVariableBehavior.PERSISTENT);
ruby.put("main", MyClass.class);
ruby.runScriptlet(readFile("Test.rb"));
As you can see, I am sharing with the Ruby script a variable called main, whose value is MyClass.class.
If I don't share anything, is the Ruby script still capable of using MyClass in my application?