On this page
class · Ruby 4.0
Prism::ArrayPatternNode
Represents an array pattern in pattern matching.
foo in 1, 2 ^^^^^^^^^^^ foo in [1, 2] ^^^^^^^^^^^^^ foo in *bar ^^^^^^^^^^^ foo in Bar[] ^^^^^^^^^^^^ foo in Bar[1, 2, 3] ^^^^^^^^^^^^^^^^^^^
Class methods 2
Instance methods 16
Attributes
Read
Represents the optional constant preceding the Array
foo in Bar[]
^^^
foo in Bar[1, 2, 3]
^^^
foo in Bar::Baz[1, 2, 3]
^^^^^^^^
Read
Represents the elements after the rest element of the array pattern.
foo in *bar, baz
^^^
Read
Represents the required elements of the array pattern.
foo in [1, 2]
^ ^
Read
Represents the rest element of the array pattern.
foo in *bar
^^^^