Class: DRbFileServer

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

Defined Under Namespace

Classes: FileX

Instance Method Summary collapse

Constructor Details

#initialize(host: 'localhost', port: '61010', path: '.') ⇒ DRbFileServer



133
134
135
136
137
138
# File 'lib/drb_fileserver.rb', line 133

def initialize(host: 'localhost', port: '61010', path: '.')

  @host, @port = host, port
  @file = FileX.new path

end

Instance Method Details

#startObject



140
141
142
143
144
145
# File 'lib/drb_fileserver.rb', line 140

def start()

  DRb.start_service "druby://#{@host}:#{@port}", @file
  DRb.thread.join

end