From 4730fb0321ea2c9f03d1609cc906a417fba935b2 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Thu, 23 Jul 2009 18:57:00 -0700 Subject: Improve pause method and documentation. --- libmpd.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libmpd.rb b/libmpd.rb index 89702b3..775a084 100644 --- a/libmpd.rb +++ b/libmpd.rb @@ -99,9 +99,12 @@ class MPD return send_request command end - # Toggles pause. - def pause pause - return send_request 'pause ' + pause.to_s + # Sets pause state. + # + # Accepts an argument of _true_ to enable or _false_ to disable. + # If no argument is given, defaults to _true_. + def pause pause=true + return send_request 'pause %s' % pause.to_i end # Stops playing. -- cgit v1.2.3-70-g09d2