summaryrefslogtreecommitdiff
path: root/libmpd
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2009-08-01 13:31:42 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2009-08-01 13:31:42 -0700
commitf59a6ac1ececbae96cc4430056b6f1ac128f3823 (patch)
treeacb67ef55a8c552c1438d7de475d08bf48dfe1b1 /libmpd
parentb97bca3602ae18a02774f8ae114a3a977049d43e (diff)
downloadruby-libmpd-f59a6ac1ececbae96cc4430056b6f1ac128f3823.tar.gz
ruby-libmpd-f59a6ac1ececbae96cc4430056b6f1ac128f3823.tar.xz
Refactoring status code.
Diffstat (limited to 'libmpd')
-rw-r--r--libmpd/status.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/libmpd/status.rb b/libmpd/status.rb
index b86c135..ee14b5f 100644
--- a/libmpd/status.rb
+++ b/libmpd/status.rb
@@ -11,17 +11,22 @@
# Collection of methods related to the status.
module MPDStatus
- # Returns a Hash containing information about the current song.
- def currentsong
+ # Clears the current error message in the status.
+ def clearerror
+ return send_request('clearerror')
+ end
+
+ # Returns information about the current song.
+ def current
return generate_hash(send_request('currentsong'))
end
- # Returns a Hash containing the current status.
+ # Returns the status.
def status
return generate_hash(send_request('status'))
end
- # Returns a Hash containing statistics.
+ # Returns statistics.
def stats
return generate_hash(send_request('stats'))
end