From 518fd933403911ed23658c31e945cf88f44d462f Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Thu, 23 Jul 2009 22:24:29 -0700 Subject: New file for methods dealing with MPD status. --- libmpd/status.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 libmpd/status.rb (limited to 'libmpd') diff --git a/libmpd/status.rb b/libmpd/status.rb new file mode 100644 index 0000000..de00e07 --- /dev/null +++ b/libmpd/status.rb @@ -0,0 +1,22 @@ +#!/usr/bin/env ruby +# +# Copyright 2009 David Vazgenovich Shakaryan +# Distributed under the terms of the GNU General Public License v3. +# See http://www.gnu.org/licenses/gpl.txt for the full license text. + +module MPDStatus + # Returns a Hash containing information about the current song. + def currentsong + return generate_hash send_request 'currentsong' + end + + # Returns a Hash containing the current status. + def status + return generate_hash send_request 'status' + end + + # Returns a Hash containing statistics. + def stats + return generate_hash send_request 'stats' + end +end -- cgit v1.2.3-70-g09d2