Namespace

Included Modules

Cinch::Plugin

Attributes

bot[R]

@return [Bot]

Public Class Methods

included(by) click to toggle source
# File lib/cinch/plugin.rb, line 301
def self.included(by)
  by.extend ClassMethods
end
new(bot) click to toggle source

@api private

# File lib/cinch/plugin.rb, line 266
def initialize(bot)
  @bot = bot
  self.class.__register_with_bot(bot, self)
end

Public Instance Methods

config() click to toggle source

Provides access to plugin-specific options.

@return [Hash] A hash of options

# File lib/cinch/plugin.rb, line 297
def config
  @bot.config.plugins.options[self.class] || {}
end
execute(*args) click to toggle source

This method will be executed whenever a message matches the {Plugin::ClassMethods#match match pattern} of the plugin.

@abstract @return [void] @see Plugin::ClassMethods#match

# File lib/cinch/plugin.rb, line 291
def execute(*args)
end
listen(*args) click to toggle source

This method will be executed whenever an event the plugin {Plugin::ClassMethods#listen_to listens to} occurs.

@abstract @return [void] @see Plugin::ClassMethods#listen_to

# File lib/cinch/plugin.rb, line 282
def listen(*args)
end
synchronize(*args, &block) click to toggle source

(see Bot#synchronize)

# File lib/cinch/plugin.rb, line 272
def synchronize(*args, &block)
  @bot.synchronize(*args, &block)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.