Class: BotBaseDRbClient

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of BotBaseDRbClient.



10
11
12
13
14
15
# File 'lib/botbase_drb_client.rb', line 10

def initialize(host: 'localhost', port: '60600')
  DRb.start_service

  @bot = DRbObject.new nil, "druby://#{host}:#{port}"

end

Instance Method Details

#received(s) ⇒ Object



17
18
19
# File 'lib/botbase_drb_client.rb', line 17

def received(s)
  @bot.received s
end