Class: BotBaseDRbServer

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

Instance Method Summary collapse

Constructor Details

#initialize(host: 'localhost', port: '60600', config: '') ⇒ BotBaseDRbServer

Returns a new instance of BotBaseDRbServer.



12
13
14
15
16
17
18
# File 'lib/botbase_drb_server.rb', line 12

def initialize(host: 'localhost', port: '60600', 
              config: '')

  @host, @port = host, port
  @bot = BotBase.new(config)

end

Instance Method Details

#startObject



20
21
22
23
24
25
# File 'lib/botbase_drb_server.rb', line 20

def start()

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

end