class Anyplayer::RdioMac

Public Instance Methods

album() click to toggle source
# File lib/anyplayer/players/rdio_mac.rb, line 44
def album
  rdio "return album of current track"
end
artist() click to toggle source
# File lib/anyplayer/players/rdio_mac.rb, line 40
def artist
  rdio "return artist of current track"
end
launched?() click to toggle source
# File lib/anyplayer/players/rdio_mac.rb, line 53
def launched?
  %x(osascript -e 'app "rdio" is running').rstrip == "true"
end
name() click to toggle source
# File lib/anyplayer/players/rdio_mac.rb, line 57
def name
  "Rdio Mac"
end
next() click to toggle source
Calls superclass method Anyplayer::Player#next
# File lib/anyplayer/players/rdio_mac.rb, line 19
def next
  rdio "next track"
  super
end
pause() click to toggle source
# File lib/anyplayer/players/rdio_mac.rb, line 6
def pause
  rdio "pause"
end
platforms() click to toggle source
# File lib/anyplayer/players/rdio_mac.rb, line 61
def platforms
  [:mac]
end
play() click to toggle source
# File lib/anyplayer/players/rdio_mac.rb, line 2
def play
  rdio "play"
end
playing?() click to toggle source
# File lib/anyplayer/players/rdio_mac.rb, line 48
def playing?
  playing = rdio "return player state is playing"
  playing == "true"
end
playpause() click to toggle source
# File lib/anyplayer/players/rdio_mac.rb, line 10
def playpause
  rdio "playpause"
end
prev() click to toggle source
Calls superclass method Anyplayer::Player#prev
# File lib/anyplayer/players/rdio_mac.rb, line 14
def prev
  rdio "previous track"
  super
end
track() click to toggle source
# File lib/anyplayer/players/rdio_mac.rb, line 36
def track
  rdio "return name of current track"
end
voldown() click to toggle source
# File lib/anyplayer/players/rdio_mac.rb, line 24
def voldown
  rdio "set sound volume to sound volume - 10"
end
volume() click to toggle source
# File lib/anyplayer/players/rdio_mac.rb, line 32
def volume
  rdio "return sound volume"
end
volup() click to toggle source
# File lib/anyplayer/players/rdio_mac.rb, line 28
def volup
  rdio "set sound volume to sound volume + 10"
end

Private Instance Methods

rdio(command) click to toggle source
# File lib/anyplayer/players/rdio_mac.rb, line 67
def rdio(command)
  %x(osascript -e 'tell app "rdio" to #{command}').rstrip
end