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
end
Instead of directly use the constant:
def self.default_starts_date
DEFAULT_STARTS_DATE.call
end
If 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
end
Also, this didn't appear on the tests cause in the test_helper.rb#setup is setting it
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 doRecurrence_.default_starts_dateeverything works fine. We can also just force thestartsoption, and everything is fine.Notice that you've changed
default_stars_dateclass method a couple months ago, which raised this issue when usingRecurrenceor any class that extends fromRecurrence_Is there any specific reason to have the method like:
Instead of directly use the constant:
If 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?
Also, this didn't appear on the tests cause in the
test_helper.rb#setupis setting it