diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2009-07-23 18:57:00 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2009-07-23 18:57:00 -0700 |
commit | 4730fb0321ea2c9f03d1609cc906a417fba935b2 (patch) | |
tree | c7feeb9eda7d86810780ae1fbee660b70556509b | |
parent | ab7494d42eae74133e6cf6d4d6c85aeaecf19939 (diff) | |
download | ruby-libmpd-4730fb0321ea2c9f03d1609cc906a417fba935b2.tar.gz ruby-libmpd-4730fb0321ea2c9f03d1609cc906a417fba935b2.tar.xz |
Improve pause method and documentation.
-rw-r--r-- | libmpd.rb | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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. |