jruby/docs BETA
Navigation
org.jruby.embed.internal 12
C AbstractLocalContextProvider
C BiVariableMap
C ConcurrentLocalContextProvider
C EmbedEvalUnitImpl
C EmbedRubyInterfaceAdapterImpl
C EmbedRubyObjectAdapterImpl
C EmbedRubyRuntimeAdapterImpl
C LocalContext
I LocalContextProvider
C SingleThreadLocalContextProvider
C SingletonLocalContextProvider
C ThreadSafeLocalContextProvider
EmbedEvalUnitImpl — members 3
M local_var_scope() DynamicScope
M node() Node
M run() IRubyObject

org.jruby.embed.internal.EmbedEvalUnitImpl

class implements EmbedEvalUnit 3 members

Implementation of org.jruby.javasupport.JavaEmbedUtils.EvalUnit for embeddiing. This class is created when a Ruby script has been parsed. Once parsed, the script is ready to run many times without parsing.

Users do not instantiate explicitly. Instead, they can get the instance by parsing Ruby script by parse method of ScriptingContainer.

Instance Methods

local_var_scope

DynamicScope local_var_scope ( )
Java: getLocalVarScope() · also: get_local_var_scope

Returns a ManyVarsDynamicScope used to parse a script. A returned value is used to inject Ruby's local variable when script is evaluated.

Returns: a scope to refer local variables

node

Node node ( )
Java: getNode() · also: get_node

Returns a root node of parsed Ruby script.

Returns: a root node of parsed Ruby script

run

IRubyObject run ( )
Java: run()

Evaluates a Ruby script, which has been parsed before.

Returns: results of executing this evaluation unit