Class: Zeiger::QueryClient
- Inherits:
-
Object
- Object
- Zeiger::QueryClient
- Defined in:
- lib/zeiger/query_client.rb
Class Method Summary collapse
Class Method Details
.run(pwd, command, q, *args) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/zeiger/query_client.rb', line 3 def self.run pwd, command, q, *args Socket.unix(SOCKET_NAME) { |sock| s = YAML.dump({ pwd: pwd, search: q }) sock.write([s.bytesize].pack("I")) sock.write(s) while !sock.eof? puts sock.readline end } end |