Sha256: 46a4c860ae9e06b2e5b30a67b2b96e52911a22dd5fd23a5b82be951994a360ee

Contents?: true

Size: 1.26 KB

Versions: 4

Compression:

Stored size: 1.26 KB

Contents

package org.ruboto;

public class ScriptInfo {
    private String rubyClassName;
    private String scriptName;
    private Object rubyInstance;

    // FIXME(uwe):  Only used for legacy handle_xxx callbacks.  Remove when we stop supporting these.
    private final Object[] callbackProcs;

    public ScriptInfo(int callbackSize) {
        callbackProcs = new Object[callbackSize];
    }

    public Object[] getCallbackProcs() {
        return callbackProcs;
    }

    public void setCallbackProc(int id, Object obj) {
        callbackProcs[id] = obj;
    }

    public String getRubyClassName() {
        if (rubyClassName == null && scriptName != null) {
            return Script.toCamelCase(scriptName);
         }
        return rubyClassName;
    }

    public void setRubyClassName(String name) {
        rubyClassName = name;
    }

    public Object getRubyInstance() {
        return rubyInstance;
    }

    public void setRubyInstance(Object instance) {
        rubyInstance = instance;
    }

    public String getScriptName() {
        if (scriptName == null && rubyClassName != null) {
            return Script.toSnakeCase(rubyClassName) + ".rb";
        }
        return scriptName;
    }

    public void setScriptName(String name) {
        scriptName = name;
    }

}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruboto-0.9.0 assets/src/org/ruboto/ScriptInfo.java
ruboto-0.9.0.rc.1 assets/src/org/ruboto/ScriptInfo.java
ruboto-0.9.0.rc.0 assets/src/org/ruboto/ScriptInfo.java
ruboto-0.8.1 assets/src/org/ruboto/ScriptInfo.java