lib/hiccup/enumerable/never_enumerator.rb in hiccup-0.5.14 vs lib/hiccup/enumerable/never_enumerator.rb in hiccup-0.5.15
- old
+ new
@@ -1,28 +1,28 @@
require 'hiccup/enumerable/schedule_enumerator'
module Hiccup
module Enumerable
class NeverEnumerator < ScheduleEnumerator
-
-
+
+
def next
@cursor = @cursor ? nil : first_occurrence_on_or_after(seed_date)
end
-
+
def prev
@cursor = @cursor ? nil : first_occurrence_on_or_before(seed_date)
end
-
-
+
+
def first_occurrence_on_or_after(date)
start_date if date <= start_date
end
-
+
def first_occurrence_on_or_before(date)
start_date unless date < start_date
end
-
-
+
+
end
end
end