Hahah, let me explain, i am using Jruby to run Ruby code into java, i created a class called BaseMod, this class is a Mod and load the Ruby and i can use all Api in Ruby.
Example:
require 'java'
import 'net.minecraft.block.Block'
import 'net.minecraft.block.material.Material'
class RubyBlock < Block
def intialize(material)
super(material)
end
end
All code created in ruby is loaded after BaseMod is initiated, and they will be in a separated folder called "ruby_core" the code runs perfectly but i need a way to load the resources with the ruby Code.
Yes jruby compile ruby to class files, but i can do this in real time using a ruby or java code:
Example:
user_name = java.lang.System.getProperty("user.name")
mods_path = File.join('C:', 'Users', user_name, 'AppData', 'Roaming', '.minecraft', 'ruby_mods', '*.rb')
Dir[mods_path].each do |file|
puts "[Ruby_core][Load]: #{file}"
load file
end
and this scripts can use the API normally
Exists others projects that do this:
https://github.com/enebo/Purugin
http://dev.bukkit.org/bukkit-plugins/rubybukkit/
They was made to work with Bukkit, my mod is made to work with Forge.
But you are not wrong maybe a good solution is create a Lib or an Api or something that is encapsulated in a Jar like Ruboto.