lib/rufus/scheduler/jobs_repeat.rb in rufus-scheduler-3.8.2 vs lib/rufus/scheduler/jobs_repeat.rb in rufus-scheduler-3.9.0

- old
+ new

@@ -91,11 +91,10 @@ end def resume(opts={}) @resume_discard_past = opts[:discard_past] -#p [ :@resume_discard_past, @resume_discard_past ] @paused_at = nil end def paused? @@ -143,21 +142,10 @@ (count - 1).times.inject([ next_time ]) { |a| a << next_time_from(a.last) a } end - - protected - - def discard_past? - - dp = @scheduler.discard_past - dp = @discard_past if @discard_past != nil - dp = @resume_discard_past if @resume_discard_past != nil - - dp - end end # # A parent class of EveryJob and IntervalJob # @@ -178,10 +166,9 @@ def initialize(scheduler, duration, opts, block) super(scheduler, duration, opts, block) @frequency = Rufus::Scheduler.parse_in(@original) - @discard_past = opts[:discard_past] fail ArgumentError.new( "cannot schedule #{self.class} with a frequency " + "of #{@frequency.inspect} (#{@original.inspect})" ) if @frequency <= 0