We create a new Ruby module that can be included by BotModules that want to provide remote interfaces
Redefine the default cleanup method.
# File lib/rbot/core/remote.rb, line 288 def cleanup super remote_cleanup end
Unregister the remote maps.
# File lib/rbot/core/remote.rb, line 278 def remote_cleanup return unless defined? @remote_maps @remote_maps.each { |h| @bot.remote_dispatcher.unmap(self, h) } @remote_maps.clear end
The remote_map acts just like the BotModule#map method, except that the map is registered to the @bot's remote_dispatcher. Also, the remote map handle is handled for the cleanup management
# File lib/rbot/core/remote.rb, line 271 def remote_map(*args) @remote_maps = Array.new unless defined? @remote_maps @remote_maps << @bot.remote_dispatcher.map(self, *args) end
Generated with the Darkfish Rdoc Generator 2.