Module Skates
In: lib/skates/base/controller.rb
lib/skates/base/stanza.rb
lib/skates/base/view.rb
lib/skates/client_connection.rb
lib/skates/component_connection.rb
lib/skates/generator.rb
lib/skates/router/dsl.rb
lib/skates/router.rb
lib/skates/runner.rb
lib/skates/xmpp_connection.rb
lib/skates/xmpp_parser.rb
lib/skates/xpath_helper.rb
lib/skates.rb

Skates is a XMPP Component Framework based on EventMachine. It uses the Nokogiri GEM, which is a Ruby wrapper for Libxml2. It implements the MVC paradigm. You can create your own application by running :

  $> skates app_name

This will generate some folders and files for your application. Please see README.rdoc for further instructions

Methods

Classes and Modules

Module Skates::Base
Module Skates::Generator
Module Skates::Router
Class Skates::AuthenticationError
Class Skates::ClientConnection
Class Skates::ComponentConnection
Class Skates::NoConnection
Class Skates::NotConnected
Class Skates::Route
Class Skates::Runner
Class Skates::StanzaRouter
Class Skates::StanzaTooBig
Class Skates::XmlNotWellFormed
Class Skates::XmppConnection
Class Skates::XmppParser
Class Skates::XpathHelper

Public Class methods

Caches the view files to improve performance.

[Source]

    # File lib/skates.rb, line 65
65:   def self.cache_views
66:     @@views= {}
67:     Dir.glob('app/views/*/*').each do |f|
68:       @@views[f] = File.read(f)
69:     end        
70:   end

Return the configuration for this component.

[Source]

    # File lib/skates.rb, line 97
97:   def self.config
98:     @@config
99:   end

Set the configuration for this component.

[Source]

    # File lib/skates.rb, line 91
91:   def self.config=(conf)
92:     @@config = conf
93:   end

Decodes XML special characters.

[Source]

     # File lib/skates.rb, line 103
103:   def self.decode_xml(str)
104:     CGI.unescapeHTML(str)
105:   end

[Source]

    # File lib/skates.rb, line 41
41:   def self.environment
42:     unless self.class_variable_defined?("@@env")
43:       @@env = "development"
44:     end
45:     @@env
46:   end

[Source]

    # File lib/skates.rb, line 37
37:   def self.environment=(_env)
38:     @@env = _env
39:   end

Returns a shared logger for this component.

[Source]

    # File lib/skates.rb, line 81
81:   def self.logger
82:     unless self.class_variable_defined?("@@logger")
83:       @@logger = Log4r::Logger.new("Skates")
84:       @@logger.add(Log4r::Outputter.stdout) if Skates.environment == "development"
85:     end
86:     @@logger
87:   end

Retruns the router

[Source]

    # File lib/skates.rb, line 56
56:   def self.router
57:     unless self.class_variable_defined?("@@router")
58:       @@router = nil
59:     end
60:     @@router
61:   end

Sets up the router

[Source]

    # File lib/skates.rb, line 50
50:   def self.router=(router)
51:     @@router = router
52:   end

[Source]

    # File lib/skates.rb, line 72
72:   def self.views
73:     unless self.class_variable_defined?("@@views")
74:       @@views= {}
75:     end
76:     @@views
77:   end

[Validate]