Android Open Source - tijuana Script Info






From Project

Back to project page tijuana.

License

The source code is released under:

Copyright (c) 2013 Paul Estrada Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Sof...

If you think the Android project tijuana listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.ruboto;
//from  ww w.j  ava2s.  c  om
public class ScriptInfo {
    private String rubyClassName;
    private String scriptName;
    private Object rubyInstance;

    public boolean isReadyToLoad() {
      return rubyClassName != null || scriptName != null;
    }

    public boolean isLoaded() {
      return rubyInstance != null;
    }

    public void setFromIntent(android.content.Intent intent) {
      android.os.Bundle configBundle = intent.getBundleExtra("Ruboto Config");

      if (configBundle != null) {
        if (configBundle.containsKey("ClassName")) {
          setRubyClassName(configBundle.getString("ClassName"));
        }
        if (configBundle.containsKey("Script")) {
          setScriptName(configBundle.getString("Script"));
        }
      }
    }

    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;
    }

}




Java Source Code List

com.crowdint.tijuana.TijuanaActivity.java
org.ruboto.EntryPointActivity.java
org.ruboto.JRubyAdapter.java
org.ruboto.Log.java
org.ruboto.RubotoActivity.java
org.ruboto.RubotoBroadcastReceiver.java
org.ruboto.RubotoComponent.java
org.ruboto.RubotoDialog.java
org.ruboto.RubotoService.java
org.ruboto.ScriptInfo.java
org.ruboto.ScriptLoader.java
org.ruboto.Script.java