lib/chronic/repeaters/repeater_weekend.rb in chronic-0.9.1 vs lib/chronic/repeaters/repeater_weekend.rb in chronic-0.10.0

- old
+ new

@@ -1,17 +1,18 @@ module Chronic class RepeaterWeekend < Repeater #:nodoc: WEEKEND_SECONDS = 172_800 # (2 * 24 * 60 * 60) - def initialize(type) + def initialize(type, options = {}) super + @current_week_start = nil end def next(pointer) super - if !@current_week_start + unless @current_week_start case pointer when :future saturday_repeater = RepeaterDayName.new(:saturday) saturday_repeater.start = @now next_saturday_span = saturday_repeater.next(:future) @@ -61,6 +62,6 @@ def to_s super << '-weekend' end end -end \ No newline at end of file +end