Class: DRbFileServer
- Inherits:
-
Object
- Object
- DRbFileServer
- Defined in:
- lib/drb_fileserver.rb
Defined Under Namespace
Classes: FileX
Instance Method Summary collapse
-
#initialize(host: 'localhost', port: '61010') ⇒ DRbFileServer
constructor
A new instance of DRbFileServer.
- #start ⇒ Object
Constructor Details
#initialize(host: 'localhost', port: '61010') ⇒ DRbFileServer
Returns a new instance of DRbFileServer.
21 22 23 24 25 26 |
# File 'lib/drb_fileserver.rb', line 21 def initialize(host: 'localhost', port: '61010') @host, @port = host, port @file = FileX.new end |
Instance Method Details
#start ⇒ Object
28 29 30 31 32 33 |
# File 'lib/drb_fileserver.rb', line 28 def start() DRb.start_service "druby://#{@host}:#{@port}", @file DRb.thread.join end |