summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libmpd.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/libmpd.rb b/libmpd.rb
index d211e71..89702b3 100644
--- a/libmpd.rb
+++ b/libmpd.rb
@@ -6,6 +6,20 @@
require 'socket'
+class TrueClass
+ # Return integer 1.
+ def to_i
+ return 1
+ end
+end
+
+class FalseClass
+ # Return integer 0.
+ def to_i
+ return 0
+ end
+end
+
class MPD
# Initialise an MPD object with the specified host and port.
#
@@ -85,7 +99,7 @@ class MPD
return send_request command
end
- # Toggles pause. (1 = pause, 0 = play)
+ # Toggles pause.
def pause pause
return send_request 'pause ' + pause.to_s
end