Class: Jabber::PubSub::Configuration

Class | Jabber::PubSub::Configuration
In: | lib/xmpp4r/pubsub/children/configuration.rb
Parent: | XMPPElement

### Methods

form form= form_type node node= options options=

### Public Instance methods

form()

get the underlying XData form element

[Source]

        # File lib/xmpp4r/pubsub/children/configuration.rb, line 14
    14:       def form
    15:         children.each do |c|
    16:           return c if c.kind_of?(Jabber::Dataforms::XData)
    17:         end
    18:
    19:         nil
    20:       end

form=(form)

[Source]

        # File lib/xmpp4r/pubsub/children/configuration.rb, line 22
    22:       def form=(form)
    23:         children.each do |c|
    24:           delete_element(c)
    25:           if c.kind_of?(Jabber::Dataforms::XData)
    26:             delete(c)
    27:           end
    28:         end
    29:         add(form)
    30:       end

form_type()

Implemented by NodeConfig and SubscriptionConfig

[Source]

        # File lib/xmpp4r/pubsub/children/configuration.rb, line 33
    33:       def form_type
    34:         ''
    35:       end

node()

[Source]

        # File lib/xmpp4r/pubsub/children/configuration.rb, line 62
    62:       def node
    63:         attributes['node']
    64:       end

node=(node)

[Source]

        # File lib/xmpp4r/pubsub/children/configuration.rb, line 58
    58:       def node=(node)
    59:         attributes['node'] = node
    60:       end

options()

get a list of the configured options represented by this stanza

return: | [Hash] the options and their values

[Source]

        # File lib/xmpp4r/pubsub/children/configuration.rb, line 46
    46:       def options
    47:         configured_options = {}
    48:
    49:         if !form.nil?
    50:           form.fields.each do |f|
    51:             f.values.size == 1 ? configured_options[f.var] = f.values.first : configured_options[f.var] = f.values
    52:           end
    53:         end
    54:
    55:         configured_options
    56:       end

options=(options)

[Source]

        # File lib/xmpp4r/pubsub/children/configuration.rb, line 37
    37:       def options=(options)
    38:         if options
    39:           self.form = form_for_options( form_type, options )
    40:         end
    41:       end

[Validate]