Skip to content
On this page

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

class · Ruby 3.4

Prism::HashPatternNode

< Prism::Node 16 instance methods 2 class methods

Represents a hash pattern in pattern matching.

foo => { a: 1, b: 2 }
       ^^^^^^^^^^^^^^

foo => { a: 1, b: 2, **c }
       ^^^^^^^^^^^^^^^^^^^

Class methods 2

Instance methods 16

Attributes
Read

attr_reader constant: ConstantReadNode | ConstantPathNode | nil

Read

attr_reader elements: Array[AssocNode]

Read

attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil