Class: NOTAM::Schedule::Dates
- Inherits:
-
ScheduleArray
- Object
- Array
- ScheduleArray
- NOTAM::Schedule::Dates
- Defined in:
- lib/notam/schedule.rb
Instance Method Summary collapse
-
#cluster ⇒ AIXM::Schedule::Dates
Convert subsequent entries to ranges.
Methods inherited from ScheduleArray
#cover?, #inspect, #next, #to_s
Instance Method Details
#cluster ⇒ AIXM::Schedule::Dates
Convert subsequent entries to ranges
328 329 330 331 332 333 334 |
# File 'lib/notam/schedule.rb', line 328 def cluster self.class.new( entries .slice_when { _1.next != _2 } .map { _1.count > 1 ? (_1.first.._1.last) : _1.first } ) end |