org.codehaus.waffle.controller
Class RubyController

java.lang.Object
  extended by org.codehaus.waffle.controller.RubyController
All Implemented Interfaces:
ScriptedController

public class RubyController
extends java.lang.Object
implements ScriptedController

Ruby wrapper that uses the underlying Ruby runtime to invoke the scripted controller execute method.

Author:
Michael Ward, Mauro Talevi

Constructor Summary
RubyController(org.jruby.runtime.builtin.IRubyObject rubyObject)
           
 
Method Summary
 java.lang.Object execute()
          This will invoke the method on the ruby object instance this controller is maintaining.
 org.jruby.runtime.builtin.IRubyObject getScriptObject()
           
 void setMethodName(java.lang.String methodName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RubyController

public RubyController(org.jruby.runtime.builtin.IRubyObject rubyObject)
Method Detail

setMethodName

public void setMethodName(java.lang.String methodName)
Specified by:
setMethodName in interface ScriptedController

getScriptObject

public org.jruby.runtime.builtin.IRubyObject getScriptObject()
Specified by:
getScriptObject in interface ScriptedController

execute

public java.lang.Object execute()
This will invoke the method on the ruby object instance this controller is maintaining.

Specified by:
execute in interface ScriptedController
Returns:
the result from the method invocation.


Copyright © 2008. All Rights Reserved.