mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
19 lines
No EOL
556 B
Ruby
19 lines
No EOL
556 B
Ruby
module RecurringTodos
|
|
|
|
class DailyRecurringTodosBuilder < AbstractRecurringTodosBuilder
|
|
attr_reader :recurring_todo, :pattern
|
|
|
|
def initialize(user, attributes)
|
|
super(user, attributes)
|
|
@pattern = DailyRepeatPattern.new(user, @filterred_attributes)
|
|
end
|
|
|
|
def filter_attributes(attributes)
|
|
@filterred_attributes = filter_generic_attributes(attributes)
|
|
%w{daily_selector daily_every_x_days}.each{|key| @filterred_attributes[key] = attributes[key] if attributes.key?(key)}
|
|
@filterred_attributes
|
|
end
|
|
|
|
end
|
|
|
|
end |