public class ThreeVarDynamicScope extends TwoVarDynamicScope
| Modifier and Type | Field and Description |
|---|---|
protected IRubyObject |
variableValueTwo |
variableValueOnevariableValueZeroparent, staticScope| Constructor and Description |
|---|
ThreeVarDynamicScope(StaticScope staticScope) |
ThreeVarDynamicScope(StaticScope staticScope,
DynamicScope parent) |
| Modifier and Type | Method and Description |
|---|---|
DynamicScope |
cloneScope() |
IRubyObject |
getValue(int offset,
int depth)
Get value from current scope or one of its captured scopes.
|
IRubyObject |
getValueDepthZeroOrNil(int offset,
IRubyObject nil)
getValueOrNil for depth 0
|
IRubyObject |
getValueOrNil(int offset,
int depth,
IRubyObject nil)
Variation of getValue that checks for nulls, returning and setting the given value (presumably nil)
|
IRubyObject[] |
getValues() |
IRubyObject |
getValueTwoDepthZeroOrNil(IRubyObject nil)
getValueOrNil for index 2, depth 0
|
void |
growIfNeeded() |
IRubyObject |
setValue(int offset,
IRubyObject value,
int depth)
Set value in current dynamic scope or one of its captured scopes.
|
IRubyObject |
setValueDepthZero(IRubyObject value,
int offset)
setValue for depth zero
|
IRubyObject |
setValueTwoDepthZero(IRubyObject value)
Set value two in this scope.
|
getValueOneDepthZeroOrNil, setValueOneDepthZerogetValueZeroDepthZeroOrNil, setValueZeroDepthZerogetValueThreeDepthZeroOrNil, growIfNeeded, setValueThreeDepthZeroclearEvalType, getAllNamesInScope, getEvalType, getFlipScope, getNextCapturedScope, getNthParentScope, getParentScope, getStaticScope, inBindingEval, inInstanceEval, inModuleEval, isLambda, newDummyScope, newDynamicScope, newDynamicScope, newDynamicScope, setEvalType, setLambda, setValue, toString, toStringprotected IRubyObject variableValueTwo
public ThreeVarDynamicScope(StaticScope staticScope, DynamicScope parent)
public ThreeVarDynamicScope(StaticScope staticScope)
public void growIfNeeded()
growIfNeeded in class TwoVarDynamicScopepublic DynamicScope cloneScope()
cloneScope in class TwoVarDynamicScopepublic IRubyObject[] getValues()
getValues in class TwoVarDynamicScopepublic IRubyObject getValue(int offset, int depth)
getValue in class TwoVarDynamicScopeoffset - zero-indexed value that represents where variable livesdepth - how many captured scopes down this variable should be setpublic IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil)
getValueOrNil in class OneVarDynamicScopepublic IRubyObject getValueDepthZeroOrNil(int offset, IRubyObject nil)
DynamicScopegetValueDepthZeroOrNil in class TwoVarDynamicScopepublic IRubyObject getValueTwoDepthZeroOrNil(IRubyObject nil)
DynamicScopegetValueTwoDepthZeroOrNil in class NoVarsDynamicScopepublic IRubyObject setValue(int offset, IRubyObject value, int depth)
setValue in class TwoVarDynamicScopeoffset - zero-indexed value that represents where variable livesvalue - to setdepth - how many captured scopes down this variable should be setpublic IRubyObject setValueDepthZero(IRubyObject value, int offset)
DynamicScopesetValueDepthZero in class TwoVarDynamicScopevalue - to setoffset - zero-indexed value that represents where variable livespublic IRubyObject setValueTwoDepthZero(IRubyObject value)
DynamicScopesetValueTwoDepthZero in class NoVarsDynamicScopeCopyright © 2001-2015 JRuby. All Rights Reserved.