mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-21 01:30:12 +01:00
24 lines
655 B
Ruby
24 lines
655 B
Ruby
|
|
module RecurringTodos
|
||
|
|
|
||
|
|
class YearlyRecurringTodosBuilder < AbstractRecurringTodosBuilder
|
||
|
|
|
||
|
|
def initialize(user, attributes)
|
||
|
|
super(user, attributes)
|
||
|
|
@pattern = YearlyRepeatPattern.new(user, @filterred_attributes)
|
||
|
|
end
|
||
|
|
|
||
|
|
def filter_attributes(attributes)
|
||
|
|
@filterred_attributes = filter_generic_attributes(attributes)
|
||
|
|
|
||
|
|
%w{ yearly_selector yearly_month_of_year yearly_month_of_year2
|
||
|
|
yearly_every_x_day yearly_every_xth_day yearly_day_of_week
|
||
|
|
}.each do |key|
|
||
|
|
@filterred_attributes[key] = attributes[key] if attributes.key?(key)
|
||
|
|
end
|
||
|
|
|
||
|
|
@filterred_attributes
|
||
|
|
end
|
||
|
|
|
||
|
|
end
|
||
|
|
|
||
|
|
end
|