Parent

Class/Module Index [+]

Quicksearch

Cinch::PluginList

@since 2.0.0

Public Class Methods

new(bot) click to toggle source
# File lib/cinch/plugin_list.rb, line 4
def initialize(bot)
  @bot     = bot
  super()
end

Public Instance Methods

register_plugin(plugin) click to toggle source

@param [Class<Plugin>] plugin

# File lib/cinch/plugin_list.rb, line 10
def register_plugin(plugin)
  self << plugin.new(@bot)
end
register_plugins(plugins) click to toggle source

@param [Array<Class<Plugin>>] plugins

# File lib/cinch/plugin_list.rb, line 15
def register_plugins(plugins)
  plugins.each { |plugin| register_plugin(plugin) }
end
unregister_all() click to toggle source

@since 2.0.0

# File lib/cinch/plugin_list.rb, line 34
def unregister_all
  unregister_plugins(self)
end
unregister_plugin(plugin) click to toggle source

@since 2.0.0

# File lib/cinch/plugin_list.rb, line 20
def unregister_plugin(plugin)
  plugin.unregister
  delete(plugin)
end
unregister_plugins(plugins) click to toggle source

@since 2.0.0

# File lib/cinch/plugin_list.rb, line 26
def unregister_plugins(plugins)
  if plugins == self
    plugins = self.dup
  end
  plugins.each { |plugin| unregister_plugin(plugin) }
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.