Method: God::CLI::Command#setup
- Defined in:
- lib/god/cli/command.rb
#setup ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/god/cli/command.rb', line 13 def setup # connect to drb unix socket DRb.start_service("druby://127.0.0.1:0") @server = DRbObject.new(nil, God::Socket.socket(@options[:port])) # ping server to ensure that it is responsive begin @server.ping rescue DRb::DRbConnError puts "The server is not available (or you do not have permissions to access it)" abort end end |