module Blur
Blur
is a very modular IRC-framework for ruby.
It allows the developer to extend it in multiple ways. It can be by handlers, scripts, communications, and what have you.
Constants
- Version
The current version of
Blur
.
Public Class Methods
Creates a new superscript class and inserts it into the list of scripts.
# File library/blur.rb, line 35 def self.Script name, *args, &block klass = Class.new SuperScript klass.name = name klass.events = {} klass.class_exec &block klass.init scripts[name] = klass end
Instantiates a client with given options and then makes the client instance evaluate the given block to form a DSL.
@note The idea is that this should never stop or return anything. @param [Hash] options the options for the client. @option options [Array] networks list of hashes that contain network
options.
# File library/blur.rb, line 66 def self.connect options = {}, &block Client.new(options).tap do |client| client.instance_eval &block end.connect end
Resets all scripts.
This method will call `deinit` on each script class before removing them to give them a chance to clean up.
# File library/blur.rb, line 54 def self.reset_scripts! scripts.each_value &:deinit scripts.clear end
Gets all superscript classes.
# File library/blur.rb, line 46 def self.scripts @scripts ||= {} end
Get the current version.
@return [String] The current version of Blur
.
# File library/blur/version.rb, line 10 def self.version Version end