Class: StarlarkCompiler::AST::Array
- 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) ⇒ Array
constructor
A new instance of Array.
Constructor Details
#initialize(elements) ⇒ Array
Returns a new instance of Array.
119 120 121 |
# File 'lib/starlark_compiler/ast.rb', line 119 def initialize(elements) @elements = elements.map(&method(:node)) end |
Instance Attribute Details
#elements ⇒ Object (readonly)
Returns the value of attribute elements.
118 119 120 |
# File 'lib/starlark_compiler/ast.rb', line 118 def elements @elements end |