Class: BotBaseDRbServer
- Inherits:
-
Object
- Object
- BotBaseDRbServer
- Defined in:
- lib/botbase_drb_server.rb
Instance Method Summary collapse
-
#initialize(host: 'localhost', port: '60600', config: '') ⇒ BotBaseDRbServer
constructor
A new instance of BotBaseDRbServer.
- #start ⇒ Object
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
#start ⇒ Object
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 |