class Jabber::PubSub::SubscriptionConfig
An <options> XMPP element, see example 57 in www.xmpp.org/extensions/xep-0060.html#subscriber-configure-success
Public Class Methods
new(node = nil, jid = nil, options = nil, subid = nil)
click to toggle source
Construct a new Options stanza
- node
- String
-
the node to which this subscription applies
- jid
- String
-
or [Jabber::JID] the jid that holds the subscription
- options
- Hash
-
the configuration for this subscription
- subid
- String
-
(optional) subscription id
Calls superclass method
# File lib/xmpp4r/pubsub/children/subscription_config.rb, line 25 def initialize(node = nil, jid = nil, options = nil, subid = nil) super() self.node = node self.jid = jid self.options = options self.subid = subid end
Public Instance Methods
jid()
click to toggle source
get the 'jid' attribute for this stanza
# File lib/xmpp4r/pubsub/children/subscription_config.rb, line 43 def jid attributes['jid'] ? Jabber::JID.new(attributes['jid']) : nil end
jid=(jid)
click to toggle source
set the 'jid' attribute of this stanza
- jid
- Jabber::JID
-
or [String] the jid owning the subscription
# File lib/xmpp4r/pubsub/children/subscription_config.rb, line 37 def jid=(jid) attributes['jid'] = jid.to_s end
subid()
click to toggle source
get the 'subid' attribute
# File lib/xmpp4r/pubsub/children/subscription_config.rb, line 56 def subid attributes['subid'] end
subid=(subid)
click to toggle source
set the 'subid' attribute
- subid
- String
-
the subscription id
# File lib/xmpp4r/pubsub/children/subscription_config.rb, line 50 def subid=(subid) attributes['subid'] = subid end
Private Instance Methods
form_type()
click to toggle source
# File lib/xmpp4r/pubsub/children/subscription_config.rb, line 62 def form_type 'http://jabber.org/protocol/pubsub#subscribe_options' end