Browse files

Make sure schedules have rules in README

Closes #66
  • Loading branch information...
1 parent 55e470c commit 5d135c8657fddbf76819bd4bf300f049d111daa0 @seejohnrun seejohnrun committed Feb 8, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 README.md
View
3 README.md
@@ -74,14 +74,17 @@ schedule.next_occurrences(3, [from_date])
# or give the schedule a duration and ask if occurring_at?
schedule = Schedule.new(Time.now, :duration => 3600)
+schedule.add_recurrence_rule Rule.daily
schedule.occurring_at?(Time.now + 1800) # true
# you can also give schedules a solidified end_time
schedule = Schedule.new(Time.now, :end_time => Time.now + 3600)
+schedule.add_recurrence_rule Rule.daily
schedule.occurs_at?(Time.now + 3601) # false
# Or take control
schedule = Schedule.new
+schedule.add_recurrence_rule Rule.daily
schedule.each_occurrence { |t| puts t }
```

0 comments on commit 5d135c8

Please sign in to comment.