Class: Airplay::Player::Timers

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Enumerable
Defined in:
lib/airplay/player/timers.rb

Instance Method Summary collapse

Constructor Details

#initializeTimers

Returns a new instance of Timers.



9
10
11
# File 'lib/airplay/player/timers.rb', line 9

def initialize
  @timers = []
end

Instance Method Details

#<<(timer) ⇒ Object



13
14
15
# File 'lib/airplay/player/timers.rb', line 13

def <<(timer)
  @timers << timer
end

#cancelObject



22
23
24
# File 'lib/airplay/player/timers.rb', line 22

def cancel
  @timers.each { |t| t.cancel }
end

#resetObject



17
18
19
20
# File 'lib/airplay/player/timers.rb', line 17

def reset
  @timers.each { |t| t.reset }
  @timers = []
end