Accessing EMF models with JRuby
January 27, 2008
JRuby provides access to Java packages, so it is possible to use packages created with the Eclipse Modeling Framework (EMF).
First we have to load the Java packages. The java packages have to be contained in the CLASSPATH.
Then we initialize the EMF package and load a file that contains the data of my little hardboiled library.
The following snippet prints out all the books.
We can print out all the books with less than 240 pages with the following statement.
Or we can print out the titles of all the books of Raymond Chandler available.
Remark: This post was adapted to the new blog format in November 2016.