org.jruby.evaluator
Class ASTInterpreter
java.lang.Object
org.jruby.evaluator.ASTInterpreter
public class ASTInterpreter
- extends java.lang.Object
Method Summary |
static RubyArray |
arrayValue(Ruby runtime,
IRubyObject value)
|
static IRubyObject |
aryToAry(IRubyObject value,
Ruby runtime)
|
static IRubyObject |
aryToAry(Ruby runtime,
IRubyObject value)
|
static IRubyObject |
aValueSplat(IRubyObject value,
Ruby runtime)
|
static IRubyObject |
aValueSplat(Ruby runtime,
IRubyObject value)
|
static IRubyObject |
eval(Ruby runtime,
ThreadContext context,
Node node,
IRubyObject self,
Block block)
|
static IRubyObject |
evalSimple(ThreadContext context,
IRubyObject self,
IRubyObject src,
java.lang.String file,
int lineNumber)
Evaluate the given string. |
static IRubyObject |
evalWithBinding(ThreadContext context,
IRubyObject src,
IRubyObject scope,
java.lang.String file,
int lineNumber)
Evaluate the given string under the specified binding object. |
static Block |
getBlock(Ruby runtime,
ThreadContext context,
IRubyObject self,
Block currentBlock,
Node blockNode)
|
static RubyModule |
getClassVariableBase(ThreadContext context,
Ruby runtime)
|
static IRubyObject |
pollAndReturn(ThreadContext context,
IRubyObject result)
|
static RubyArray |
splatValue(IRubyObject value,
Ruby runtime)
|
static RubyArray |
splatValue(Ruby runtime,
IRubyObject value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ASTInterpreter
public ASTInterpreter()
eval
public static IRubyObject eval(Ruby runtime,
ThreadContext context,
Node node,
IRubyObject self,
Block block)
evalWithBinding
public static IRubyObject evalWithBinding(ThreadContext context,
IRubyObject src,
IRubyObject scope,
java.lang.String file,
int lineNumber)
- Evaluate the given string under the specified binding object. If the binding is not a Proc or Binding object
(RubyProc or RubyBinding) throw an appropriate type error.
- Parameters:
context
- TODOevalString
- The string containing the text to be evaluatedbinding
- The binding object under which to perform the evaluationfile
- The filename to use when reporting errors during the evaluationlineNumber
- is the line number to pretend we are starting from
- Returns:
- An IRubyObject result from the evaluation
evalSimple
public static IRubyObject evalSimple(ThreadContext context,
IRubyObject self,
IRubyObject src,
java.lang.String file,
int lineNumber)
- Evaluate the given string.
- Parameters:
context
- TODOevalString
- The string containing the text to be evaluatedfile
- The filename to use when reporting errors during the evaluationlineNumber
- that the eval supposedly starts from
- Returns:
- An IRubyObject result from the evaluation
arrayValue
public static RubyArray arrayValue(Ruby runtime,
IRubyObject value)
aryToAry
public static IRubyObject aryToAry(Ruby runtime,
IRubyObject value)
pollAndReturn
public static IRubyObject pollAndReturn(ThreadContext context,
IRubyObject result)
aValueSplat
public static IRubyObject aValueSplat(Ruby runtime,
IRubyObject value)
getBlock
public static Block getBlock(Ruby runtime,
ThreadContext context,
IRubyObject self,
Block currentBlock,
Node blockNode)
getClassVariableBase
public static RubyModule getClassVariableBase(ThreadContext context,
Ruby runtime)
splatValue
public static RubyArray splatValue(Ruby runtime,
IRubyObject value)
splatValue
public static RubyArray splatValue(IRubyObject value,
Ruby runtime)
aValueSplat
public static IRubyObject aValueSplat(IRubyObject value,
Ruby runtime)
aryToAry
public static IRubyObject aryToAry(IRubyObject value,
Ruby runtime)
Copyright © 2002-2007 JRuby Team. All Rights Reserved.