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
@return [Instance] the instance associated with this player
Public Class Methods
@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
@param instance [Instance] the instance associated with the player
# File lib/muzak/player/stub_player.rb, line 26 def initialize(instance) @instance = instance end
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
Activates the player. @return [void] @note NO-OP
# File lib/muzak/player/stub_player.rb, line 40 def activate! debug "#activate!" end
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
Deactivates the player. @return [void] @note NO-OP
# File lib/muzak/player/stub_player.rb, line 47 def deactivate! debug "#deactivate!" end
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
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
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 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
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
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
Ends playback. @return [void] @note NO-OP
# File lib/muzak/player/stub_player.rb, line 61 def pause debug "#pause" end
Starts playback. @return [void] @note NO-OP
# File lib/muzak/player/stub_player.rb, line 54 def play debug "#play" end
@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
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
@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 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