Module: Walkman::Commands::Controls
- Defined in:
- lib/walkman/commands/controls.rb
Class Method Summary collapse
Class Method Details
.next(count = 1) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/walkman/commands/controls.rb', line 18 def self.next(count = 1) if current_song = Walkman.player.current_song Walkman.player.playlist.feedback(:skip, current_song) end Walkman.player.next(count) song = Walkman.player.current_song output = ["♫".blue, "Skipping"] output << ["to", song.title.bold, "by", song.artist.bold] if song output.flatten.join(" ") end |
.play ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/walkman/commands/controls.rb', line 4 def self.play Walkman.player.play song = Walkman.player.current_song output = ["♫".blue, "Playing"] output << [song.title.bold, "by", song.artist.bold] if song output.flatten.join(" ") end |
.stop ⇒ Object
13 14 15 16 |
# File 'lib/walkman/commands/controls.rb', line 13 def self.stop Walkman.player.stop "" end |