Class: EventMachine::ITunesWatch

Inherits:
DistributedNotificationWatch
  • Object
show all
Defined in:
lib/eventmachine-itunes.rb

Instance Method Summary collapse

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, )
  states = {
    'Playing' => :on_play,
    'Paused'  => :on_pause,
    'Stopped' => :on_stop
  }

  __send__(states[['Player State']], )
end

#on_pause(user_info) ⇒ Object



16
# File 'lib/eventmachine-itunes.rb', line 16

def on_pause(); end

#on_play(user_info) ⇒ Object



15
# File 'lib/eventmachine-itunes.rb', line 15

def on_play(); end

#on_stop(user_info) ⇒ Object



17
# File 'lib/eventmachine-itunes.rb', line 17

def on_stop(); end