Class: Muzak::Player::StubPlayer
- Inherits:
-
Object
- Object
- Muzak::Player::StubPlayer
- Includes:
- Utils
- Defined in:
- lib/muzak/player/stub_player.rb
Overview
A no-op player that all players inherit from.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#instance ⇒ Instance
readonly
The instance associated with this player.
Instance Method Summary collapse
-
#activate! ⇒ void
Activates the player.
-
#clear_queue ⇒ void
Clear the player's queue.
-
#deactivate! ⇒ void
Deactivates the player.
-
#enqueue_album(album) ⇒ void
Enqueues the given album.
-
#enqueue_playlist(playlist) ⇒ void
Enqueues the given playlist.
-
#enqueue_song(song) ⇒ void
Enqueues the given song.
-
#initialize(instance) ⇒ StubPlayer
constructor
A new instance of StubPlayer.
-
#list_queue ⇒ void
List the player's queue.
-
#next_song ⇒ void
Moves to the next song.
-
#now_playing ⇒ void
Get the currently playing song.
-
#pause ⇒ void
Ends playback.
-
#play ⇒ void
Starts playback.
-
#playing? ⇒ false
Whether or not the player is currently playing.
-
#previous_song ⇒ void
Moves to the previous song.
-
#running? ⇒ false
Whether or not the player is running.
-
#shuffle_queue ⇒ void
Shuffle the player's queue.
Methods included from Utils
#album_art?, #debug, #debug?, #error, #fail_arity, #info, #music?, #output, #pretty, resolve_command, resolve_method, #verbose, #verbose?, #warn, #warn_arity
Constructor Details
#initialize(instance) ⇒ StubPlayer
Returns a new instance of StubPlayer.
11 12 13 |
# File 'lib/muzak/player/stub_player.rb', line 11 def initialize(instance) @instance = instance end |
Instance Attribute Details
#instance ⇒ Instance (readonly)
Returns the instance associated with this player.
8 9 10 |
# File 'lib/muzak/player/stub_player.rb', line 8 def instance @instance end |
Instance Method Details
#activate! ⇒ void
NO-OP
This method returns an undefined value.
Activates the player.
25 26 27 |
# File 'lib/muzak/player/stub_player.rb', line 25 def activate! debug "#activate!" end |
#clear_queue ⇒ void
NO-OP
This method returns an undefined value.
Clear the player's queue.
112 113 114 |
# File 'lib/muzak/player/stub_player.rb', line 112 def clear_queue debug "#clear_queue" end |
#deactivate! ⇒ void
NO-OP
This method returns an undefined value.
Deactivates the player.
32 33 34 |
# File 'lib/muzak/player/stub_player.rb', line 32 def deactivate! debug "#deactivate!" end |
#enqueue_album(album) ⇒ void
NO-OP
This method returns an undefined value.
Enqueues the given album.
83 84 85 |
# File 'lib/muzak/player/stub_player.rb', line 83 def enqueue_album(album) debug "#enqueue_album" end |
#enqueue_playlist(playlist) ⇒ void
NO-OP
This method returns an undefined value.
Enqueues the given playlist.
91 92 93 |
# File 'lib/muzak/player/stub_player.rb', line 91 def enqueue_playlist(playlist) debug "#enqueue_playlist" end |
#enqueue_song(song) ⇒ void
NO-OP
This method returns an undefined value.
Enqueues the given song.
75 76 77 |
# File 'lib/muzak/player/stub_player.rb', line 75 def enqueue_song(song) debug "#enqueue_song" end |
#list_queue ⇒ void
NO-OP
This method returns an undefined value.
List the player's queue.
98 99 100 |
# File 'lib/muzak/player/stub_player.rb', line 98 def list_queue debug "#list_queue" end |
#next_song ⇒ void
NO-OP
This method returns an undefined value.
Moves to the next song.
60 61 62 |
# File 'lib/muzak/player/stub_player.rb', line 60 def next_song debug "#next_song" end |
#now_playing ⇒ void
NO-OP
This method returns an undefined value.
Get the currently playing song.
119 120 121 |
# File 'lib/muzak/player/stub_player.rb', line 119 def debug "#now_playing" end |
#pause ⇒ void
NO-OP
This method returns an undefined value.
Ends playback.
46 47 48 |
# File 'lib/muzak/player/stub_player.rb', line 46 def pause debug "#pause" end |
#play ⇒ void
NO-OP
This method returns an undefined value.
Starts playback.
39 40 41 |
# File 'lib/muzak/player/stub_player.rb', line 39 def play debug "#play" end |
#playing? ⇒ false
NO-OP
Returns whether or not the player is currently playing.
52 53 54 55 |
# File 'lib/muzak/player/stub_player.rb', line 52 def debug "#playing?" false end |
#previous_song ⇒ void
NO-OP
This method returns an undefined value.
Moves to the previous song.
67 68 69 |
# File 'lib/muzak/player/stub_player.rb', line 67 def previous_song debug "#previous_song" end |
#running? ⇒ false
NO-OP
Returns whether or not the player is running.
17 18 19 20 |
# File 'lib/muzak/player/stub_player.rb', line 17 def running? debug "#running?" false end |
#shuffle_queue ⇒ void
NO-OP
This method returns an undefined value.
Shuffle the player's queue.
105 106 107 |
# File 'lib/muzak/player/stub_player.rb', line 105 def shuffle_queue debug "#shuffle_queue" end |