Module: NetworkExecutive::Scheduling
- Extended by:
- ActiveSupport::Concern
- Included in:
- Channel
- Defined in:
- lib/network_executive/scheduling.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #schedule ⇒ Object
- #whats_on? ⇒ Boolean
- #whats_on_at?(time) ⇒ Boolean
- #whats_on_between?(start, stop, interval = nil) ⇒ Boolean
Instance Method Details
#schedule ⇒ Object
21 22 23 |
# File 'lib/network_executive/scheduling.rb', line 21 def schedule self.class.schedule end |
#whats_on? ⇒ Boolean
13 14 15 |
# File 'lib/network_executive/scheduling.rb', line 13 def whats_on? whats_on_at? Time.now.change(sec:0) end |
#whats_on_at?(time) ⇒ Boolean
9 10 11 |
# File 'lib/network_executive/scheduling.rb', line 9 def whats_on_at?( time ) schedule.find { |sch| sch.whats_on? time } || OffAirSchedule.new end |
#whats_on_between?(start, stop, interval = nil) ⇒ Boolean
17 18 19 |
# File 'lib/network_executive/scheduling.rb', line 17 def whats_on_between?( start, stop, interval = nil ) schedule.whats_on_between? start, stop, interval end |