An implementation of BiVariable for a persistent local variable. This type of a local variable survives over multiple evaluation.
getInstance(org.jruby.RubyObject receiver, String name, Object[] javaObject)Returns an instance of this class. This factory method is used when a
persistent local variable is put in BiVariableMap.
| name | type | description |
|---|---|---|
| receiver | org.jruby.RubyObject | Receiver object returned when a script is evaluated. |
| name | String | a variable name |
| java_object | Object[] | Java object that should be assigned to. |
Returns: the instance of PersistentLocalVariable
isValidName(Object name)Returns true if the given name is a decent Ruby local variable. Unless returns false.
| name | type | description |
|---|---|---|
| name | Object | is a name to be checked. |
Returns: true if the given name is of a Ruby local variable.
retrieve(org.jruby.RubyObject receiver, org.jruby.embed.internal.BiVariableMap vars)Retrieves local variables from Ruby after the evaluation. This retrieval doesn't depend on eager option. Local variables are always retrieved eagerly.
| name | type | description |
|---|---|---|
| receiver | org.jruby.RubyObject | receiver object returned when a script is evaluated. |
| vars | org.jruby.embed.internal.BiVariableMap | map to save retrieved local variables. |
inject()Injects a local variable value to a parsed Ruby script. This method is invoked during EvalUnit#run() is executed.
remove()Attempts to remove this variable from top self or receiver.
Returns enum type of this variable defined in BiVariable.
Returns: this enum type, BiVariable.Type.LocalVariable.
isReceiverIdentical(org.jruby.RubyObject receiver)Returns true if a given receiver is identical to the receiver this object has.
Returns: true if identical otherwise false
getJavaObject() · also: get_java_objectgetName() · also: get_namesetRubyObject(org.jruby.runtime.builtin.IRubyObject rubyObject) · also: set_ruby_objectsetJavaObject(org.jruby.Ruby runtime, Object javaObject)