repo.or.cz
/
god.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
fix process#alive? to not raise on no such file
[god.git]
/
lib
/
god
/
reporter.rb
blob
e57f9c71e5cf03cfc9efa80167925e5b8d06e42c
1
require 'drb'
2
3
module God
4
5
class Reporter
6
def initialize(host = nil, port = nil)
7
@host = host
8
@port = port || 7777
9
@service = nil
10
end
11
12
def method_missing(*args, &block)
13
service.send(*args, &block)
14
end
15
16
private
17
18
def service
19
return @service if @service
20
DRb.start_service
21
@service = DRbObject.new(nil, "druby://#{@host}:#{@port}")
22
end
23
end
24
25
end