Class: StarlarkCompiler::AST::Array

Inherits:
Node
  • Object
show all
Defined in:
lib/starlark_compiler/ast.rb

Constant Summary

Constants inherited from Node

Node::TYPE

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#elementsObject (readonly)

Returns the value of attribute elements.



118
119
120
# File 'lib/starlark_compiler/ast.rb', line 118

def elements
  @elements
end