Class: BotBaseModuleRSC
- Inherits:
-
Object
- Object
- BotBaseModuleRSC
- Defined in:
- lib/botbase-module-rsc.rb
Instance Method Summary collapse
-
#initialize(host: nil, package: :gg, job: :execute_command, callback: nil) ⇒ BotBaseModuleRSC
constructor
A new instance of BotBaseModuleRSC.
- #query(sender = 'user01', s, mode: :textchat, echo_node: 'node1') ⇒ Object
Constructor Details
#initialize(host: nil, package: :gg, job: :execute_command, callback: nil) ⇒ BotBaseModuleRSC
Returns a new instance of BotBaseModuleRSC.
12 13 14 15 16 |
# File 'lib/botbase-module-rsc.rb', line 12 def initialize(host: nil, package: :gg, job: :execute_command, callback: nil) @package, @job, @bot = RSC.new(host).send(package), job, callback end |
Instance Method Details
#query(sender = 'user01', s, mode: :textchat, echo_node: 'node1') ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/botbase-module-rsc.rb', line 18 def query(sender='user01', s, mode: :textchat, echo_node: 'node1') r = @package.method(@job).call String.new(s) if r == 'job not found' then @bot.log.debug 'BotBaseModuleRSC/query: job not found ' + s if @bot.log [] else r end end |