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', path: '.') ⇒ DRbFileServer
constructor
A new instance of DRbFileServer.
- #start ⇒ Object
Constructor Details
#initialize(host: 'localhost', port: '61010', path: '.') ⇒ DRbFileServer
Returns a new instance of DRbFileServer.
31 32 33 34 35 36 |
# File 'lib/drb_fileserver.rb', line 31 def initialize(host: 'localhost', port: '61010', path: '.') @host, @port = host, port @file = FileX.new path end |
Instance Method Details
#start ⇒ Object
38 39 40 41 42 43 |
# File 'lib/drb_fileserver.rb', line 38 def start() DRb.start_service "druby://#{@host}:#{@port}", @file DRb.thread.join end |