class YARP::ArrayPatternNode
^^^^^^^^^^^^^^^^^^^
foo in Bar[1, 2, 3]
^^^^^^^^^^^^
foo in Bar[]
^^^^^^^^^
foo in *1
^^^^^^^^^^^^^
foo in [1, 2]
^^^^^^^^^^^
foo in 1, 2
Represents an array pattern in pattern matching.
def accept(visitor)
def accept(visitor) visitor.visit_array_pattern_node(self) end
def child_nodes
def child_nodes [constant, *requireds, rest, *posts] end
def closing
def closing closing_loc&.slice end
def deconstruct_keys(keys)
def deconstruct_keys(keys) { constant: constant, requireds: requireds, rest: rest, posts: posts, opening_loc: opening_loc, closing_loc: closing_loc, location: location } end
def initialize(constant, requireds, rest, posts, opening_loc, closing_loc, location)
def initialize(constant, requireds, rest, posts, opening_loc, closing_loc, location) @constant = constant @requireds = requireds @rest = rest @posts = posts @opening_loc = opening_loc @closing_loc = closing_loc @location = location end
def opening
def opening opening_loc&.slice end