Methods
Attributes
[RW] end_time
[RW] repeat_interval
[RW] start_time
Public Class methods
new(opts={})
    # File server/trigger.rb, line 6
 6:     def initialize(opts={})
 7:       @start_time = Time.parse(opts[:start])
 8:       @end_time = Time.parse(opts[:end])
 9:       @repeat_interval = opts[:repeat_interval].to_i
10:     end
Public Instance methods
fire_time_after(time)
    # File server/trigger.rb, line 12
12:     def fire_time_after(time)
13:       @start_time = time  if not @start_time
14: 
15:       # Support UNIX at-style scheduling, by just specifying a start
16:       # time.
17:       if @end_time.nil? and @repeat_interval.nil?
18:         @end_time = start_time + 1
19:         @repeat_interval = 1
20:       end
21: 
22:       case
23:       when @end_time && time > @end_time
24:         nil
25:       when time < @start_time
26:         @start_time
27:       when @repeat_interval != nil && @repeat_interval > 0
28:         time + @repeat_interval - ((time - @start_time) % @repeat_interval)
29:       end
30:     end