class BotBaseDRbServer

Public Class Methods

new(host: 'localhost', port: '60600', config: '', notifier: nil, log: nil) click to toggle source
# File lib/botbase_drb_server.rb, line 12
def initialize(host: 'localhost', port: '60600', config: '', 
               notifier: nil, log: nil)

  log.info 'BotBaseDRbServer/initialize: active' if log
  
  @host, @port, @log = host, port, log
  @bot = BotBase.new(config, notifier: notifier, log: log)
  
  log.info 'BotBaseDRbServer/initialize: completed' if log

end

Public Instance Methods

start() click to toggle source
# File lib/botbase_drb_server.rb, line 24
def start()

  @log.info 'BotBaseDRbServer/start: active' if @log
  DRb.start_service "druby://#{@host}:#{@port}", @bot
  DRb.thread.join

end