Class: DRbFileServerPlus

Inherits:
Object
  • Object
show all
Defined in:
lib/drb_fileserver_plus.rb

Instance Method Summary collapse

Constructor Details

#initialize(host: 'localhost', port: '61010', nodes: []) ⇒ DRbFileServerPlus

Returns a new instance of DRbFileServerPlus.



53
54
55
56
57
# File 'lib/drb_fileserver_plus.rb', line 53

def initialize(host: 'localhost', port: '61010', nodes: [])

  @host, @port, @nodes = host, port, nodes

end

Instance Method Details

#startObject



59
60
61
62
63
64
# File 'lib/drb_fileserver_plus.rb', line 59

def start()
  
  DRb.start_service "druby://#{@host}:#{@port}", DRbFileServer.new(@nodes)
  DRb.thread.join

end