org.mentawai.jruby
Class JRubyWrapper
java.lang.Object
org.mentawai.jruby.JRubyWrapper
public class JRubyWrapper
- extends Object
A simple wrapper class to encapsulate a Ruby object
and make calls to it through a JRubyInterpreter.
- Author:
- Sergio Oliveira Jr.
- See Also:
JRubyInterpreter
|
Constructor Summary |
JRubyWrapper(org.jruby.RubyObject rubyObject)
Creates a JRubyWrapper for the ruby object passed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JRubyWrapper
public JRubyWrapper(org.jruby.RubyObject rubyObject)
- Creates a JRubyWrapper for the ruby object passed.
- Parameters:
rubyObject - The ruby object to encapsulate
call
public Object call(String methodName)
call
public Object call(String methodName,
Class<? extends Object> returnType)
call
public Object call(String methodName,
Class<? extends Object> returnType,
Object... params)
call
public Object call(String methodName,
Object... params)
callStatic
public Object callStatic(String methodName)
callStatic
public Object callStatic(String methodName,
Class<? extends Object> returnType)
callStatic
public Object callStatic(String methodName,
Class<? extends Object> returnType,
Object... params)
callStatic
public Object callStatic(String methodName,
Object... params)
respondTo
public boolean respondTo(String methodName)
set
public Object set(String propName,
Object value)
getRubyObject
public Object getRubyObject()
- Gets the ruby object of this wrapper.
- Returns:
- The ruby object
Copyright © 2011. All Rights Reserved.