Ruby FAQ for the Protégé Script plugin (55R)
Ruby FAQ summary (55S)
General Questions (561)
Configuration Questions (564)
Back to Protégé Script plugin Main FAQ (55U)
General Questions (55V)
What is Ruby? (55W)
Ruby is a programming language that "combines the pure object-oriented power of the classic OO language Smalltalk with the expressiveness and convenience of a scripting language such as Perl." It is a relatively mature language, known for its clean, intuitive syntax and semantics and transparent, developer friendly programming model. (55X)
How does Ruby Work in Protege? (55Y)
The ProtegeScriptTab implements Ruby by embedding JRuby into Protege using the Bean Scripting Framework (BSF). JRuby is a pure Java implementation of the Ruby language. Currently JRuby supports most but not all Ruby language elements. (55Z)
Although JRuby provides high level and low level support for manipulation of Java objects, the ProtegeScriptTab passes an OWLModel object to JRuby. Using the $kb global variable, you can seamlessly program your knowledgebase using very Ruby-esque constructs. (560)
Is JRuby an Active Project? (562)
Yes, JRuby is a very active Open Source project hosted at SourceForge and has a large user base (but not as huge as for reqular Ruby). (563)
Configuration Questions (566)
How do I make Ruby the Default Scripting Language? (567)
Edit the Protege.lax file in the main installation directory of Protégé and add the following line at the end: (568)
# DEFAULT SCRIPT LANGUAGE # ----------------------- edu.stanford.smi.protege.script.defaultScriptLanguage=jruby (569)