Class: Jabber::PubSub::SubscriptionConfig

Class | Jabber::PubSub::SubscriptionConfig
In: | lib/xmpp4r/pubsub/children/subscription_config.rb
Parent: | Configuration

SubscriptionConfig

An <options> XMPP element, see example 57 in www.xmpp.org/extensions/xep-0060.html#subscriber-configure-success

### Methods

jid jid= new subid subid=

### Public Class methods

new(node = nil, jid = nil, options = nil, subid = nil)

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

[Source]

        # File lib/xmpp4r/pubsub/children/subscription_config.rb, line 25
    25:       def initialize(node = nil, jid = nil, options = nil, subid = nil)
    26:         super()
    27:
    28:         self.node = node
    29:         self.jid = jid
    30:         self.options = options
    31:         self.subid = subid
    32:       end

### Public Instance methods

jid()

get the ‘jid’ attribute for this stanza

[Source]

        # File lib/xmpp4r/pubsub/children/subscription_config.rb, line 43
    43:       def jid
    44:         attributes['jid'] ? Jabber::JID.new(attributes['jid']) : nil
    45:       end

jid=(jid)

set the ‘jid’ attribute of this stanza

jid: | [Jabber::JID] or [String] the jid owning the subscription

[Source]

        # File lib/xmpp4r/pubsub/children/subscription_config.rb, line 37
    37:       def jid=(jid)
    38:         attributes['jid'] = jid.to_s
    39:       end

subid()

get the ‘subid’ attribute

[Source]

        # File lib/xmpp4r/pubsub/children/subscription_config.rb, line 56
    56:       def subid
    57:         attributes['subid']
    58:       end

subid=(subid)

set the ‘subid’ attribute

subid: | [String] the subscription id

[Source]

        # File lib/xmpp4r/pubsub/children/subscription_config.rb, line 50
    50:       def subid=(subid)
    51:         attributes['subid'] = subid
    52:       end

[Validate]