Class Jabber::Caps::C
In: lib/xmpp4r/caps/c.rb
Parent: XMPPElement

The <c/> XMPP element, used to advertise entity capabilities.

See www.xmpp.org/extensions/xep-0115.html#protocol.

You should not need to construct this element directly, see Jabber::Caps::Helper.

Methods

hash   new   node   ver  

Public Class methods

[Source]

    # File lib/xmpp4r/caps/c.rb, line 22
22:       def initialize(node = nil, ver = nil)
23:         super()
24:         add_attribute('node', node) if node
25:         if ver
26:           add_attribute('ver', ver)
27:           add_attribute('hash', 'sha-1')
28:         end
29:       end

Public Instance methods

Get the value of this element‘s ‘hash’ attribute, the algorithm used in generating the ‘ver’ attribute

[Source]

    # File lib/xmpp4r/caps/c.rb, line 48
48:       def hash
49:         attributes['hash']
50:       end

Get the value of this element‘s ‘node’ attribute, a ‘unique identifier for the software underlying the entity‘

[Source]

    # File lib/xmpp4r/caps/c.rb, line 41
41:       def node
42:         attributes['node']
43:       end

Get the value of this element‘s ‘ver’ attribute, an opaque hash representing this entity‘s capabilities.

[Source]

    # File lib/xmpp4r/caps/c.rb, line 34
34:       def ver
35:         attributes['ver']
36:       end

[Validate]