fix process#alive? to not raise on no such file
[god.git] / lib / god / reporter.rb
blobe57f9c71e5cf03cfc9efa80167925e5b8d06e42c
1 require 'drb'
3 module God
5   class Reporter
6     def initialize(host = nil, port = nil)
7       @host = host
8       @port = port || 7777
9       @service = nil
10     end
12     def method_missing(*args, &block)
13       service.send(*args, &block)
14     end
16     private
18     def service
19       return @service if @service
20       DRb.start_service
21       @service = DRbObject.new(nil, "druby://#{@host}:#{@port}")
22     end
23   end
25 end