class Muzak::Player::StubPlayer

A no-op player that all players inherit from. @abstract Subclass and implement all public methods to implement

a player.

Attributes

instance[R]

@return [Instance] the instance associated with this player

Public Class Methods

available?() click to toggle source

@return [true] whether or not this type of player is available

# File lib/muzak/player/stub_player.rb, line 21
def self.available?
  true
end
new(instance) click to toggle source

@param instance [Instance] the instance associated with the player

# File lib/muzak/player/stub_player.rb, line 26
def initialize(instance)
  @instance = instance
end
player_name() click to toggle source

The player's human friendly name. @return [String] the name

# File lib/muzak/player/stub_player.rb, line 16
def self.player_name
  name.split("::").last.downcase
end

Public Instance Methods

activate!() click to toggle source

Activates the player. @return [void] @note NO-OP

# File lib/muzak/player/stub_player.rb, line 40
def activate!
  debug "#activate!"
end
clear_queue() click to toggle source

Clear the player's queue. @return [void] @note NO-OP

# File lib/muzak/player/stub_player.rb, line 127
def clear_queue
  debug "#clear_queue"
end
deactivate!() click to toggle source

Deactivates the player. @return [void] @note NO-OP

# File lib/muzak/player/stub_player.rb, line 47
def deactivate!
  debug "#deactivate!"
end
enqueue_album(_album) click to toggle source

Enqueues the given album. @param album [Album] the album to enqueue @return [void] @note NO-OP

# File lib/muzak/player/stub_player.rb, line 98
def enqueue_album(_album)
  debug "#enqueue_album"
end
enqueue_playlist(_playlist) click to toggle source

Enqueues the given playlist. @param playlist [Playlist] the playlist to enqueue @return [void] @note NO-OP

# File lib/muzak/player/stub_player.rb, line 106
def enqueue_playlist(_playlist)
  debug "#enqueue_playlist"
end
enqueue_song(_song) click to toggle source

Enqueues the given song. @param song [Song] the song to enqueue @return [void] @note NO-OP

# File lib/muzak/player/stub_player.rb, line 90
def enqueue_song(_song)
  debug "#enqueue_song"
end
list_queue() click to toggle source

List the player's queue. @return [void] @note NO-OP

# File lib/muzak/player/stub_player.rb, line 113
def list_queue
  debug "#list_queue"
end
next_song() click to toggle source

Moves to the next song. @return [void] @note NO-OP

# File lib/muzak/player/stub_player.rb, line 75
def next_song
  debug "#next_song"
end
now_playing() click to toggle source

Get the currently playing song. @return [void] @note NO-OP

# File lib/muzak/player/stub_player.rb, line 134
def now_playing
  debug "#now_playing"
end
pause() click to toggle source

Ends playback. @return [void] @note NO-OP

# File lib/muzak/player/stub_player.rb, line 61
def pause
  debug "#pause"
end
play() click to toggle source

Starts playback. @return [void] @note NO-OP

# File lib/muzak/player/stub_player.rb, line 54
def play
  debug "#play"
end
playing?() click to toggle source

@return [false] whether or not the player is currently playing @note NO-OP

# File lib/muzak/player/stub_player.rb, line 67
def playing?
  debug "#playing?"
  false
end
previous_song() click to toggle source

Moves to the previous song. @return [void] @note NO-OP

# File lib/muzak/player/stub_player.rb, line 82
def previous_song
  debug "#previous_song"
end
running?() click to toggle source

@return [false] whether or not the player is running @note NO-OP

# File lib/muzak/player/stub_player.rb, line 32
def running?
  debug "#running?"
  false
end
shuffle_queue() click to toggle source

Shuffle the player's queue. @return [void] @note NO-OP

# File lib/muzak/player/stub_player.rb, line 120
def shuffle_queue
  debug "#shuffle_queue"
end