Class: Mobot::Client
- Inherits:
-
Object
- Object
- Mobot::Client
- Defined in:
- lib/mobot/client.rb
Constant Summary collapse
- SOCKET_FILE =
'/tmp/mobot.sock'
Class Method Summary collapse
Class Method Details
.run(command = ARGV[0]) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/mobot/client.rb', line 6 def self.run(command = ARGV[0]) socket = UNIXSocket.new(SOCKET_FILE) socket.write(command) socket.close_write puts socket.read end |