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
241 242 243 244 245 |
# File 'lib/t_ruby/ir.rb', line 241 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.
239 240 241 |
# File 'lib/t_ruby/ir.rb', line 239 def element_type @element_type end |
#elements ⇒ Object
Returns the value of attribute elements.
239 240 241 |
# File 'lib/t_ruby/ir.rb', line 239 def elements @elements end |
Instance Method Details
#children ⇒ Object
247 248 249 |
# File 'lib/t_ruby/ir.rb', line 247 def children @elements end |