Class: Refract::ArrayNode
Instance Attribute Summary collapse
-
#elements ⇒ Object
Returns the value of attribute elements.
Instance Method Summary collapse
-
#initialize(prism_node: nil, elements:) ⇒ ArrayNode
constructor
A new instance of ArrayNode.
Methods inherited from Node
#accept, #copy, #start_line, #type, type
Constructor Details
#initialize(prism_node: nil, elements:) ⇒ ArrayNode
Returns a new instance of ArrayNode.
5 6 7 8 9 |
# File 'lib/refract/nodes/array_node.rb', line 5 def initialize(prism_node: nil, elements:) @prism_node = prism_node => Prism::Node | nil @elements = elements freeze end |
Instance Attribute Details
#elements ⇒ Object
Returns the value of attribute elements.
11 12 13 |
# File 'lib/refract/nodes/array_node.rb', line 11 def elements @elements end |