This class represents the core of the plugin functionality of Cinch. It provides both the methods for users to write their own plugins as well as for the Cinch framework to use them.
The {ClassMethods} module, which will get included automatically in all classes that include `Cinch::Plugin`, includes all class methods that the user will use for creating plugins.
Most of the instance methods are for use by the Cinch framework and part of the private API, but some will also be used by plugin authors, mainly {config}, {synchronize} and {bot}.
@return [void] @api private
# File lib/cinch/plugin.rb, line 412 def __register missing = self.class.check_for_missing_options(@bot) unless missing.empty? @bot.loggers.warn "[plugin] #{self.class.plugin_name}: Could not register plugin because the following options are not set: #{missing.join(", ")}" return end __register_listeners __register_matchers __register_ctcps __register_timers __register_help end
Provides access to plugin-specific options.
@return [Hash] A hash of options
# File lib/cinch/plugin.rb, line 468 def config @bot.config.plugins.options[self.class] || {} end
(see Bot#synchronize)
# File lib/cinch/plugin.rb, line 461 def synchronize(*args, &block) @bot.synchronize(*args, &block) end
Generated with the Darkfish Rdoc Generator 2.