Module: Switchboard
- Defined in:
- lib/switchboard/helpers/pubsub.rb,
lib/switchboard/core.rb,
lib/switchboard/client.rb,
lib/switchboard/version.rb,
lib/switchboard/settings.rb,
lib/switchboard/component.rb,
lib/switchboard/commands/command.rb,
lib/switchboard/commands/default.rb,
lib/switchboard/commands/pep/pep.rb,
lib/switchboard/commands/pep/tune.rb,
lib/switchboard/commands/register.rb,
lib/switchboard/commands/help/help.rb,
lib/switchboard/commands/roster/add.rb,
lib/switchboard/commands/unregister.rb,
lib/switchboard/commands/pubsub/info.rb,
lib/switchboard/commands/roster/list.rb,
lib/switchboard/helpers/oauth_pubsub.rb,
lib/switchboard/commands/pep/location.rb,
lib/switchboard/commands/pubsub/items.rb,
lib/switchboard/commands/pubsub/nodes.rb,
lib/switchboard/commands/pubsub/purge.rb,
lib/switchboard/commands/config/config.rb,
lib/switchboard/commands/pubsub/config.rb,
lib/switchboard/commands/pubsub/create.rb,
lib/switchboard/commands/pubsub/delete.rb,
lib/switchboard/commands/pubsub/listen.rb,
lib/switchboard/commands/pubsub/pubsub.rb,
lib/switchboard/commands/roster/remove.rb,
lib/switchboard/commands/roster/roster.rb,
lib/switchboard/commands/pubsub/options.rb,
lib/switchboard/commands/pubsub/publish.rb,
lib/switchboard/commands/pubsub/subscribe.rb,
lib/switchboard/commands/pubsub/unsubscribe.rb,
lib/switchboard/commands/pubsub/affiliations.rb,
lib/switchboard/commands/pubsub/subscriptions.rb
Overview
require ‘xmpp4r/pubsub/helper/nodebrowser’
Defined Under Namespace
Modules: Commands, Helpers
Classes: Client, Command, Component, Core, Settings
Constant Summary
collapse
- VERSION =
[0, 0, 7]
- COMMANDS =
{}
Class Method Summary
collapse
Class Method Details
.commands(command = nil) ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/switchboard/commands/command.rb', line 4
def self.commands(command = nil)
if command
COMMANDS.select { |k,v| k =~ /^#{command.to_command_name("_")}_/ }
else
COMMANDS.reject { |k,v| k =~ /_/ }
end
end
|
.hide_command(command) ⇒ Object
12
13
14
|
# File 'lib/switchboard/commands/command.rb', line 12
def self.hide_command(command)
COMMANDS["_#{command.to_command_name("_")}"] = unregister_command(command)
end
|
.register_command(command) ⇒ Object
16
17
18
|
# File 'lib/switchboard/commands/command.rb', line 16
def self.register_command(command)
COMMANDS[command.to_command_name("_")] = command
end
|
.unregister_command(command) ⇒ Object
20
21
22
|
# File 'lib/switchboard/commands/command.rb', line 20
def self.unregister_command(command)
COMMANDS.delete(command.to_command_name("_"))
end
|