From f59a6ac1ececbae96cc4430056b6f1ac128f3823 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Sat, 1 Aug 2009 13:31:42 -0700 Subject: Refactoring status code. --- libmpd/status.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'libmpd/status.rb') 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 -- cgit v1.2.3-70-g09d2