I worked out how to use Module.prepend to mount middleware into a PORO web routing framework I've been playing around with called Rowdy.

More at https://github.com/rocketshipio/rowdy#middleware

It's still super early stages, but its a lot of fun building this with the latest Ruby 3.x features like pattern matching.

🤩

GitHub - rocketshipio/rowdy: Route web requests to classes

Route web requests to classes. Contribute to rocketshipio/rowdy development by creating an account on GitHub.

GitHub