Demonstrates how to wire up Ruby classes using Google Guice, including:
- Constructor injection
- Setter injection
- Custom Guice module in Ruby
I wrote a blog post introducing the idea.
mvn package
java -jar target/jruby-guice-1.0.jar
If using an IDE, you may have to configure it to explicitly run mvn compile
before running the project.
Start reading in src/main/java/net/rhnh/JrubyGuiceExample.java
and src/main/ruby/SimplestApp.rb
.
Perhaps you are integrating Ruby into an existing Java framework. Standalone, this is a terrible idea.