On this page
Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class · Ruby 3.4
Prism::MultiWriteNode
Represents a write to a multi-target expression.
a, b, c = 1, 2, 3 ^^^^^^^^^^^^^^^^^
Class methods 2
Instance methods 19
Attributes
Read
Represents the targets expressions before a splat node.
a, b, * = 1, 2, 3, 4, 5 ^^^^
The splat node can be absent, in that case all target expressions are in the left field.
a, b, c = 1, 2, 3, 4, 5 ^^^^^^^
Read
Represents a splat node in the target expression.
a, b, *c = 1, 2, 3, 4
^^
The variable can be empty, this results in a SplatNode with a nil expression field.
a, b, * = 1, 2, 3, 4
^
If the ‘*` is omitted, this field will contain an ImplicitRestNode
a, b, = 1, 2, 3, 4
^
Read
Represents the targets expressions after a splat node.
a, *, b, c = 1, 2, 3, 4, 5
^^^^
Read
The value to write to the targets. It can be any [non-void expression](github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
a, b, c = 1, 2, 3
^^^^^^^