-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Hi,
Thanks for the work on this gem, it has been quite useful in different projects through the years 😅
While doing some tests found a small issue doing Recurrence.default_starts_date, which raises an exception. But if you do Recurrence_.default_starts_date everything works fine. We can also just force the starts option, and everything is fine.
Notice that you've changed default_stars_date class method a couple months ago, which raised this issue when using Recurrence or any class that extends from Recurrence_
Is there any specific reason to have the method like:
def self.default_starts_date
@default_starts_date.call
endInstead of directly use the constant:
def self.default_starts_date
DEFAULT_STARTS_DATE.call
endIf you don't see any issue with the above suggestion, I would be glad to open the PR to fix it.
Edit:
While running the test got the intention for it 👍
So could it be something like this?
def self.default_starts_date
@default_starts_date ||= DEFAULT_STARTS_DATE
@default_starts_date.call
endAlso, this didn't appear on the tests cause in the test_helper.rb#setup is setting it