summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2009-07-23 18:57:00 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2009-07-23 18:57:00 -0700
commit4730fb0321ea2c9f03d1609cc906a417fba935b2 (patch)
treec7feeb9eda7d86810780ae1fbee660b70556509b
parentab7494d42eae74133e6cf6d4d6c85aeaecf19939 (diff)
downloadruby-libmpd-4730fb0321ea2c9f03d1609cc906a417fba935b2.tar.gz
ruby-libmpd-4730fb0321ea2c9f03d1609cc906a417fba935b2.tar.xz
Improve pause method and documentation.
-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.