Class: Jabber::MUC::XMUCUser

Class | Jabber::MUC::XMUCUser
In: | lib/xmpp4r/muc/x/muc.rb
Parent: | X

Class for <x/> elements with namespace jabber.org/protocol/muc#user

See JEP-0058 for details

### Methods

items status_code

### Public Instance methods

items()

Get all <item/> elements

result: | [Array] of [XMUCUserItem]

[Source]

        # File lib/xmpp4r/muc/x/muc.rb, line 61
    61:       def items
    62:         res = []
    63:         each_element('item') { |item|
    64:           res << item
    65:         }
    66:         res
    67:       end

status_code()

Retrieve the three-digit code in `<x xmlns=‘jabber.org/protocol/muc#user'> code=’…’/></x>`

result: | [Fixnum] or nil

[Source]

        # File lib/xmpp4r/muc/x/muc.rb, line 48
    48:       def status_code
    49:         e = nil
    50:         each_element('status') { |xe| e = xe }
    51:         if e and e.attributes['code'].size == 3 and e.attributes['code'].to_i != 0
    52:           e.attributes['code'].to_i
    53:         else
    54:           nil
    55:         end
    56:       end

[Validate]