Class: StarlarkCompiler::AST::VariableReference
- Defined in:
- lib/starlark_compiler/ast.rb
Constant Summary
Constants inherited from Node
Instance Attribute Summary collapse
-
#var ⇒ Object
readonly
Returns the value of attribute var.
Instance Method Summary collapse
-
#initialize(var) ⇒ VariableReference
constructor
A new instance of VariableReference.
Constructor Details
#initialize(var) ⇒ VariableReference
Returns a new instance of VariableReference.
108 109 110 111 112 113 114 |
# File 'lib/starlark_compiler/ast.rb', line 108 def initialize(var) unless var.is_a?(::String) raise "Variable Reference must be a string, not #{var.class}" end @var = var end |
Instance Attribute Details
#var ⇒ Object (readonly)
Returns the value of attribute var.
107 108 109 |
# File 'lib/starlark_compiler/ast.rb', line 107 def var @var end |