- # this sets a BOTMODULE_FNAME constant in all BotModule
- # classes defined in the module. This allows us to know
- # the filename the plugin was declared in from outside
- # the plugin itself (from within, a __FILE__ would work.)
- plugin_module.constants.each do |const|
- cls = plugin_module.const_get(const)
- if cls.is_a? Class and cls < BotModule
- cls.const_set("BOTMODULE_FNAME", fname)
- end
- end