Class: MPD::Commands::PlaylistRemove

Inherits:
Abstract
  • Object
show all
Defined in:
lib/mpd/commands/playlist_remove.rb

Overview

Removes one song from playlist by position. Uses MPD command “playlistdelete”

Instance Attribute Summary

Attributes inherited from Abstract

#connection

Instance Method Summary collapse

Methods inherited from Abstract

#initialize

Constructor Details

This class inherits a constructor from MPD::Commands::Abstract

Instance Method Details

#execute(name, position) ⇒ Object

Parameters:

  • name (String)

    playlist name.

  • position (Integer)

    song position.



14
15
16
# File 'lib/mpd/commands/playlist_remove.rb', line 14

def execute(name, position)
  exec_command("playlistdelete \"#{name}\" #{position}")
end