Module: Switchboard::Helpers::PubSubHelper

Included in:
OAuthPubSubHelper
Defined in:
lib/switchboard/helpers/pubsub.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pubsubObject (readonly)

Returns the value of attribute pubsub.



8
9
10
# File 'lib/switchboard/helpers/pubsub.rb', line 8

def pubsub
  @pubsub
end

Instance Method Details

#subscriptions(node = nil) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/switchboard/helpers/pubsub.rb', line 18

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