Commit 285ea86b1432151f3b5133a9059c953748a6fa5e

Anton Maminov 2022-05-06T16:44:50

Create client.rb

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/examples/client.rb b/examples/client.rb
new file mode 100644
index 0000000..7c21868
--- /dev/null
+++ b/examples/client.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+require 'bundler'
+Bundler.setup :default
+
+require 'logger'
+require 'mpd_client'
+
+MPD::Client.log = Logger.new($stderr)
+
+client = MPD::Client.new
+client.connect('localhost', 6600)
+
+puts client.currentsong