Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom comparison for Montrose::Schedule
In our application using Montrose, we have some instances where we want to be able to check to see if a schedule has changed. The specific use case for us is with a Rails model that is serializing a schedule - we want to be able to know if the schedule itself has changed, ie: `event.schedule_changed? #=> false` The same attributes may be assigned for the schedule's configuration - but Rails thinks that the schedule has changed b/c it's comparing the objects themselves instead of the underlying recurrence configurations. This commit overloads `Montrose::Schedule#==` so that schedules can be compared against each other within the context of their configurations.
- Loading branch information