Skip to content
On this page
class · Ruby 4.0

Prism::FindPatternNode

< Prism::Node 16 instance methods 2 class methods

Represents a find pattern in pattern matching.

foo in *bar, baz, *qux
       ^^^^^^^^^^^^^^^

foo in [*bar, baz, *qux]
       ^^^^^^^^^^^^^^^^^

foo in Foo(*bar, baz, *qux)
       ^^^^^^^^^^^^^^^^^^^^

foo => *bar, baz, *qux
       ^^^^^^^^^^^^^^^

Class methods 2

Instance methods 16

Attributes
Read

Represents the optional constant preceding the pattern

foo in Foo(*bar, baz, *qux)
       ^^^
Read

Represents the first wildcard node in the pattern.

foo in *bar, baz, *qux
       ^^^^

foo in Foo(*bar, baz, *qux)
           ^^^^
Read

Represents the nodes in between the wildcards.

foo in *bar, baz, *qux
             ^^^

foo in Foo(*bar, baz, 1, *qux)
                 ^^^^^^
Read

Represents the second wildcard node in the pattern.

foo in *bar, baz, *qux
                  ^^^^

foo in Foo(*bar, baz, *qux)
                      ^^^^