Class RubyLanguage
java.lang.Object
org.tentackle.script.AbstractScriptingLanguage
org.tentackle.script.ruby.RubyLanguage
- All Implemented Interfaces:
ScriptingLanguage
The Ruby scripting language based on the native JRuby embed API.
Registered under the abbreviations Ruby, jruby, rb and ruby (case-insensitive).
All scripts are run by a single ScriptingContainer owned by this language.
Variables are referenced as Ruby instance variables, i.e. object becomes @object.
- Author:
- harald
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateScript(String code, boolean cached, boolean threadSafe, Function<String, ScriptConverter> converterProvider) String[]getName()Methods inherited from class AbstractScriptingLanguage
equals, getEffectiveCode, hashCode, toString
-
Field Details
-
NAME
-
-
Constructor Details
-
RubyLanguage
public RubyLanguage()Creates the Ruby language.
-
-
Method Details
-
getName
-
getAbbreviations
-
createScript
public Script createScript(String code, boolean cached, boolean threadSafe, Function<String, ScriptConverter> converterProvider) -
createLocalVariableReference
Ruby variables are mapped to instance variables, i.e. the name is prefixed with
@.- Specified by:
createLocalVariableReferencein interfaceScriptingLanguage- Overrides:
createLocalVariableReferencein classAbstractScriptingLanguage
-