summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libmpd.rb9
1 files 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.