Class: StarlarkCompiler::AST::Dictionary
- Defined in:
- lib/starlark_compiler/ast.rb
Constant Summary
Constants inherited from Node
Instance Attribute Summary collapse
-
#elements ⇒ Object
readonly
Returns the value of attribute elements.
Instance Method Summary collapse
-
#initialize(elements) ⇒ Dictionary
constructor
A new instance of Dictionary.
Constructor Details
#initialize(elements) ⇒ Dictionary
Returns a new instance of Dictionary.
161 162 163 |
# File 'lib/starlark_compiler/ast.rb', line 161 def initialize(elements) @elements = Hash[elements.map { |k, v| [node(k), node(v)] }] end |
Instance Attribute Details
#elements ⇒ Object (readonly)
Returns the value of attribute elements.
160 161 162 |
# File 'lib/starlark_compiler/ast.rb', line 160 def elements @elements end |