Class: CalendariumRomanum::Util::DateEnumerator
- Inherits:
-
Object
- Object
- CalendariumRomanum::Util::DateEnumerator
- Includes:
- Enumerable
- Defined in:
- lib/calendarium-romanum/util.rb
Overview
Abstract superclass for date enumerators.
Instance Method Summary collapse
- #each ⇒ Object (also: #each_day)
- #enumeration_over?(date) ⇒ Boolean
Instance Method Details
#each ⇒ Object Also known as: each_day
9 10 11 12 13 14 15 |
# File 'lib/calendarium-romanum/util.rb', line 9 def each d = @start begin yield d d = d.succ end until enumeration_over? d end |
#enumeration_over?(date) ⇒ Boolean
17 18 19 |
# File 'lib/calendarium-romanum/util.rb', line 17 def enumeration_over?(date) @start.send(@prop) != date.send(@prop) end |