Class: Scheduling::IrregularSchedule
- Inherits:
-
Struct
- Object
- Struct
- Scheduling::IrregularSchedule
- Defined in:
- lib/scheduling/schedule/irregular_schedule.rb
Instance Attribute Summary collapse
-
#dates ⇒ Object
Returns the value of attribute dates.
Instance Method Summary collapse
Instance Attribute Details
#dates ⇒ Object
Returns the value of attribute dates
2 3 4 |
# File 'lib/scheduling/schedule/irregular_schedule.rb', line 2 def dates @dates end |
Instance Method Details
#occurances(date_range) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/scheduling/schedule/irregular_schedule.rb', line 3 def occurances date_range occurances = [] dates.each do |date| if date_range.include? date occurances.push date end end return occurances.uniq.sort end |