Class: EventMachine::ITunesWatch
- Inherits:
-
DistributedNotificationWatch
- Object
- DistributedNotificationWatch
- EventMachine::ITunesWatch
- Defined in:
- lib/eventmachine-itunes.rb
Instance Method Summary collapse
- #notify(name, user_info) ⇒ Object
- #on_pause(user_info) ⇒ Object
- #on_play(user_info) ⇒ Object
- #on_stop(user_info) ⇒ Object
Instance Method Details
#notify(name, user_info) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/eventmachine-itunes.rb', line 5 def notify(name, user_info) states = { 'Playing' => :on_play, 'Paused' => :on_pause, 'Stopped' => :on_stop } __send__(states[user_info['Player State']], user_info) end |
#on_pause(user_info) ⇒ Object
16 |
# File 'lib/eventmachine-itunes.rb', line 16 def on_pause(user_info); end |
#on_play(user_info) ⇒ Object
15 |
# File 'lib/eventmachine-itunes.rb', line 15 def on_play(user_info); end |
#on_stop(user_info) ⇒ Object
17 |
# File 'lib/eventmachine-itunes.rb', line 17 def on_stop(user_info); end |