diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2009-07-23 19:39:09 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2009-07-23 19:39:09 -0700 |
commit | 5fb83d8dd3f2e8be091194f3c34eab62df04da33 (patch) | |
tree | e36272a81e20f3a65cfd130a95ac59efe8ddc322 /libmpd.rb | |
parent | cff0409822f20022d82280f2f50305c4b4ebce85 (diff) | |
download | ruby-libmpd-5fb83d8dd3f2e8be091194f3c34eab62df04da33.tar.gz ruby-libmpd-5fb83d8dd3f2e8be091194f3c34eab62df04da33.tar.xz |
Add methods: consume?, random?, repeat?, single?.
Diffstat (limited to 'libmpd.rb')
-rw-r--r-- | libmpd.rb | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -237,6 +237,34 @@ class MPD return false end + # Returns +true+ if consume is activated. + # Otherwise, returns +false+. + def consume? + return true if status[:consume] == '1' + return false + end + + # Returns +true+ if random is activated. + # Otherwise, returns +false+. + def random? + return true if status[:random] == '1' + return false + end + + # Returns +true+ if repeat is activated. + # Otherwise, returns +false+. + def repeat? + return true if status[:repeat] == '1' + return false + end + + # Returns +true+ if single is activated. + # Otherwise, returns +false+. + def single? + return true if status[:single] == '1' + return false + end + private :generate_hash private :get_response private :split_and_hash |