Class: Scheduling::RegularSchedule
- Inherits:
-
Struct
- Object
- Struct
- Scheduling::RegularSchedule
- Defined in:
- lib/scheduling/schedule/regular_schedule.rb
Instance Attribute Summary collapse
-
#date_range ⇒ Object
Returns the value of attribute date_range.
-
#regularity ⇒ Object
Returns the value of attribute regularity.
Instance Method Summary collapse
Instance Attribute Details
#date_range ⇒ Object
Returns the value of attribute date_range
2 3 4 |
# File 'lib/scheduling/schedule/regular_schedule.rb', line 2 def date_range @date_range end |
#regularity ⇒ Object
Returns the value of attribute regularity
2 3 4 |
# File 'lib/scheduling/schedule/regular_schedule.rb', line 2 def regularity @regularity end |
Instance Method Details
#occurances(date_range) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/scheduling/schedule/regular_schedule.rb', line 3 def occurances date_range occurances = [] overlap = self.date_range & date_range unless overlap.nil? occurances = regularity.occurances(overlap) end return occurances end |