Class: TRuby::IR::ArrayLiteral
Overview
Array literal
Instance Attribute Summary collapse
-
#element_type ⇒ Object
Returns the value of attribute element_type.
-
#elements ⇒ Object
Returns the value of attribute elements.
Attributes inherited from Node
#location, #metadata, #type_info
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(elements: [], element_type: nil, **opts) ⇒ ArrayLiteral
constructor
A new instance of ArrayLiteral.
Methods inherited from Node
Constructor Details
#initialize(elements: [], element_type: nil, **opts) ⇒ ArrayLiteral
Returns a new instance of ArrayLiteral.
225 226 227 228 229 |
# File 'lib/t_ruby/ir.rb', line 225 def initialize(elements: [], element_type: nil, **opts) super(**opts) @elements = elements @element_type = element_type end |
Instance Attribute Details
#element_type ⇒ Object
Returns the value of attribute element_type.
223 224 225 |
# File 'lib/t_ruby/ir.rb', line 223 def element_type @element_type end |
#elements ⇒ Object
Returns the value of attribute elements.
223 224 225 |
# File 'lib/t_ruby/ir.rb', line 223 def elements @elements end |
Instance Method Details
#children ⇒ Object
231 232 233 |
# File 'lib/t_ruby/ir.rb', line 231 def children @elements end |