At NYC.rb, I introduced Montrose, a gem I created to model recurrence in Ruby.


Star this deck on SpeaderDeck.

Why would you need Montrose? Well, a calendaring or scheduling application may reach a point where it needs to handle entries that repeat at predefined intervals; it may useful to have an abstraction to represent that recurrence. How would you handle "every Friday 13th, forever"? It wouldn't be feasible to generate infinite events upfront to represent each instance - Montrose helps you define and enumerate these recurrences on demand.

# Friday the 13th, forever
Montrose.monthly(on: { friday: 13 })

I also wrote plenty of examples using Montrose if you're interested to learn more.

Favorite the project on GitHub and fork it to contribute.


If you liked this presentation, share it on Twitter and follow me.

Need help with Webpack on Rails?

My name is Ross Kaffenberger.

Webpacker now ships by default in Rails 6 but there's no need to stress. I'm putting together a course to help you master Webpack on Rails.

I teach full stack web developers about frontend tools and performance, especially at the intersection of JavaScript and Ruby on Rails.

Subscribe to stay in the loop.