Hey,

I've added some preliminary support for JRuby. It is implemented as a 
generic mixin (JRubyMixin), and works like this:
if you have an interface HelloWorld with a bunch of methods, and that 
interface is used by a Composite, then you should create a Ruby source 
file named HelloWorld.rb with contents such as the following:
class HelloWorld
   def say
     return @this.phrase + " "[EMAIL PROTECTED]
   end
end
--
The "class" must have the same name as the interface, and must currently 
implement all the methods. The "@this" instance variable is created 
automatically by the mixin and points to the Composite, so that all 
other methods in it are available. The above is also an example of 
getPhrase() being automatically translated into "phase".

That's about it. Take a look in the code if you're interested, and feel 
free to improve it. This is the first time I've ever written Ruby code 
so I really have no idea what I am doing, but was simply inspired by a 
JRuby talk at the DevSummit conference, and it seemed easy enough to do.

/Rickard

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to