Module: Lightswitch::ScheduleCollectionMixin
- Includes:
- ScheduleCommon
- Included in:
- ScheduleCollection
- Defined in:
- lib/lightswitch/schedule_mixins.rb
Instance Method Summary collapse
Methods included from ScheduleCommon
#decode_state, #encode_state, #get_schedule_state_change
Instance Method Details
#down?(at_time) ⇒ Boolean
33 34 35 |
# File 'lib/lightswitch/schedule_mixins.rb', line 33 def down?(at_time) !up?(at_time) end |
#up?(at_time) ⇒ Boolean
28 29 30 |
# File 'lib/lightswitch/schedule_mixins.rb', line 28 def up?(at_time) !(schedules.any? { |schedule| schedule.down?(at_time) }) end |