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.rb | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'libmpd.rb') diff --git a/libmpd.rb b/libmpd.rb index 3fddded..ca96290 100644 --- a/libmpd.rb +++ b/libmpd.rb @@ -6,6 +6,7 @@ require 'socket' require 'libmpd/playbackoptions' +require 'libmpd/status' class TrueClass # :nodoc: def to_i @@ -21,6 +22,7 @@ end class MPD include MPDPlaybackOptions + include MPDStatus # Initialise an MPD object with the specified host and port. # @@ -67,21 +69,6 @@ class MPD return hash end - # 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 - # Begins playing the playlist. If argument is supplied, begin at specified # song position. def play songpos=false -- cgit v1.2.3-70-g09d2