Enumerate events from a recurrence
mainA Montrose recurrence object is itself Enumerable and responds to #events, which returns an Enumerator of timestamps.
Warning: Some recurrences (like Montrose.daily) represent infinite sequences. Attempting to eagerly enumerate them (e.g., using .map or .to_a without limits) will cause the process to hang. To safely work with infinite recurrences, use the .lazy enumerator to apply filters and limits.
# Basic enumeration
r = Montrose.hourly
r.events.take(10)
# Handling infinite sequences with .lazy
r = Montrose.daily
r.lazy.map(&:to_date).select { |d| d.mday > 25 }.take(5).to_a