Module: PubSubHelper
- Included in:
- Switchboard::Helpers::OAuthPubSubHelper
- Defined in:
- lib/switchboard/helpers/pubsub.rb
Overview
require ‘xmpp4r/pubsub/helper/nodebrowser’
Instance Attribute Summary collapse
-
#pubsub ⇒ Object
readonly
Returns the value of attribute pubsub.
Instance Method Summary collapse
Instance Attribute Details
#pubsub ⇒ Object (readonly)
Returns the value of attribute pubsub.
6 7 8 |
# File 'lib/switchboard/helpers/pubsub.rb', line 6 def pubsub @pubsub end |
Instance Method Details
#on_pubsub_event(&block) ⇒ Object
13 14 15 |
# File 'lib/switchboard/helpers/pubsub.rb', line 13 def on_pubsub_event(&block) register_hook(:pubsub_event, &block) end |
#subscriptions(node = nil) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/switchboard/helpers/pubsub.rb', line 17 def subscriptions(node = nil) # NOTE: node-specific subscriptions do not appear to work in ejabberd 2.0.2 if node pubsub.get_subscriptions_from(node) else pubsub.get_subscriptions_from_all_nodes end end |