One of the things I enjoy most in functional programming languages is the rich support for pattern matching. While Ruby has long had some rudimentary pattern matching and deconstruction capabilities, it hasn’t come close to the kind of deep structural matching and data extraction available in languages like Haskell or Elixir.
As of Ruby 2.7, however, all that is starting to change. In today’s episode, guest chef Jordan Raine will show you a practical application of Ruby’s new pattern-matching case statements. Enjoy!