Module: Blur
- Defined in:
- library/blur.rb,
library/blur/user.rb,
library/blur/client.rb,
library/blur/script.rb,
library/blur/channel.rb,
library/blur/network.rb,
library/blur/version.rb,
library/blur/handling.rb,
library/blur/callbacks.rb,
library/blur/script_cache.rb,
library/blur/network/isupport.rb,
library/blur/network/connection.rb
Overview
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.
Defined Under Namespace
Modules: Callbacks, Commands Classes: Channel, Client, ClientError, ConfigError, Network, ScriptCache, SuperScript, User
Constant Summary collapse
- VERSION =
The current version of Blur.
'2.1.6'
Class Method Summary collapse
-
.connect(options = {}, &block) ⇒ Object
Instantiates a client with given options and then makes the client instance evaluate the given block to form a DSL.
-
.reset_scripts! ⇒ Object
Resets all scripts.
-
.Script(name, *_args, &block) ⇒ Object
Creates a new superscript class and inserts it into the list of scripts.
-
.scripts ⇒ Object
Gets all superscript classes.
-
.version ⇒ String
Get the current version.
Class Method Details
.connect(options = {}, &block) ⇒ Object
The idea is that this should never stop or return anything.
Instantiates a client with given options and then makes the client instance evaluate the given block to form a DSL.
68 69 70 71 72 |
# File 'library/blur.rb', line 68 def self.connect = {}, &block Client.new().tap do |client| client.instance_eval &block end.connect end |
.reset_scripts! ⇒ Object
Resets all scripts.
This method will call ‘deinit` on each script class before removing them to give them a chance to clean up.
56 57 58 59 |
# File 'library/blur.rb', line 56 def self.reset_scripts! scripts.each_value &:deinit scripts.clear end |
.Script(name, *_args, &block) ⇒ Object
Creates a new superscript class and inserts it into the list of scripts.
37 38 39 40 41 42 43 44 45 |
# File 'library/blur.rb', line 37 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 |
.scripts ⇒ Object
Gets all superscript classes.
48 49 50 |
# File 'library/blur.rb', line 48 def self.scripts @scripts ||= {} end |
.version ⇒ String
Get the current version.
10 11 12 |
# File 'library/blur/version.rb', line 10 def self.version VERSION end |