diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-10 16:09:08 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-10 16:09:08 +0100 |
commit | f1608b8098d0302f7e5c0e7989c78fa310d7d424 (patch) | |
tree | f4e1a9a9a5f6c0873bc568c96a21fbade7170104 /lib/mauve/notification.rb | |
parent | a54a32084e9870af6f1ede97887c2332c21e812c (diff) |
Removed MauveTime. Added more tests.
Diffstat (limited to 'lib/mauve/notification.rb')
-rw-r--r-- | lib/mauve/notification.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/mauve/notification.rb b/lib/mauve/notification.rb index adb61c3..71dd69c 100644 --- a/lib/mauve/notification.rb +++ b/lib/mauve/notification.rb @@ -15,13 +15,13 @@ module Mauve # # ... later on ... # - # DuringRunner.new(MauveTime.now, my_alert, &during).inside? + # DuringRunner.new(Time.now, my_alert, &during).inside? # # ... or to ask when an alert will next be cued ... # - # DuringRunner.new(MauveTime.now, my_alert, &during).find_next + # DuringRunner.new(Time.now, my_alert, &during).find_next # - # which will return a MauveTime object, or nil if the time period will + # which will return a Time object, or nil if the time period will # not be valid again, at least not in the next week. # class DuringRunner @@ -171,7 +171,7 @@ module Mauve end # Should we notify at all? - is_relevant = DuringRunner.new(MauveTime.now, alert, &during).now? + is_relevant = DuringRunner.new(Time.now, alert, &during).now? people.collect do |person| case person @@ -191,8 +191,10 @@ module Mauve end def remind_at_next(alert) - return nil unless alert.raised? - DuringRunner.new(MauveTime.now, alert, &during).find_next(every) + + return DuringRunner.new(Time.now, alert, &during).find_next(every) if alert.raised? + + return nil end end |