org.eclipse.ease.lang.ruby

## Class RubyCodeFactory

- java.lang.Object
- - org.eclipse.ease.AbstractCodeFactory
  - - org.eclipse.ease.lang.ruby.RubyCodeFactory

All Implemented Interfaces:
  ICodeFactory

    public class RubyCodeFactory
    extends AbstractCodeFactory

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.eclipse.ease.ICodeFactory

`ICodeFactory.Parameter`

### Field Summary

Fields
`static java.util.List<java.lang.String>` `RESERVED_KEYWORDS`

### Fields inherited from class org.eclipse.ease.AbstractCodeFactory

`LINE_DELIMITER`

### Fields inherited from interface org.eclipse.ease.ICodeFactory

`RESULT_NAME, TRACE_MODULE_WRAPPER`

### Constructor Summary

Constructors
Constructor and Description
`RubyCodeFactory()`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `classInstantiation(java.lang.Class<?> clazz, java.lang.String[] parameters)` Create code to instantiate a java class.
`java.lang.String` `createFunctionWrapper(IEnvironment environment, java.lang.String moduleVariable, java.lang.reflect.Method method)` Create code for a wrapper function in the global namespace of the script engine.
`java.lang.String` `getSaveVariableName(java.lang.String variableName)` Converts a given string to a save variable name for the target language.

### Methods inherited from class org.eclipse.ease.AbstractCodeFactory

`createCommentedString, createFunctionCall, createKeywordHeader, createWrapper, getDefaultValue, getMethodAliases, getMethodNames`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### RESERVED_KEYWORDS

    public static java.util.List<java.lang.String> RESERVED_KEYWORDS

### Constructor Detail

#### RubyCodeFactory

    public RubyCodeFactory()

### Method Detail

#### getSaveVariableName

    public java.lang.String getSaveVariableName(java.lang.String variableName)

Description copied from interface: `ICodeFactory`
Converts a given string to a save variable name for the target language. Typically filters invalid characters and verifies that the returned string does not match any reserved keyword. Does not verify if the returned name is already in use.

Parameters:
  `variableName` - variable name candidate
Returns:
  converted variable name

#### createFunctionWrapper

    public java.lang.String createFunctionWrapper(IEnvironment environment,
                                                  java.lang.String moduleVariable,
                                                  java.lang.reflect.Method method)

Description copied from class: `AbstractCodeFactory`
Create code for a wrapper function in the global namespace of the script engine.

Parameters:
  `environment` - environment instance
  `moduleVariable` - function name to be used
  `method` - method to refer to
Returns:
  script code to be injected into the script engine

#### classInstantiation

    public java.lang.String classInstantiation(java.lang.Class<?> clazz,
                                               java.lang.String[] parameters)

Description copied from interface: `ICodeFactory`
Create code to instantiate a java class.

Parameters:
  `clazz` - class to instantiate
  `parameters` - parameters used for class instantiation
Returns:
  wrapped script code