Class: Airplay::Player::Timers
- Inherits:
-
Object
- Object
- Airplay::Player::Timers
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/airplay/player/timers.rb
Instance Method Summary collapse
- #<<(timer) ⇒ Object
- #cancel ⇒ Object
-
#initialize ⇒ Timers
constructor
A new instance of Timers.
- #reset ⇒ Object
Constructor Details
#initialize ⇒ Timers
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 |
#cancel ⇒ Object
22 23 24 |
# File 'lib/airplay/player/timers.rb', line 22 def cancel @timers.each { |t| t.cancel } end |
#reset ⇒ Object
17 18 19 20 |
# File 'lib/airplay/player/timers.rb', line 17 def reset @timers.each { |t| t.reset } @timers = [] end |