Class Jabber::MUC::UserItem
In: lib/xmpp4r/muc/item.rb
Parent: XMPPElement

Don‘t use this. It is the base class (unifying shared attributes) of XMUCUserItem and IqQueryMUCAdminItem

Methods

Public Instance methods

[Source]

     # File lib/xmpp4r/muc/item.rb, line 121
121:       def actors
122:         a = []
123:         each_element('actor') { |xe|
124:           a.push(JID.new(xe.attributes['jid']))
125:         }
126:         a
127:       end

[Source]

     # File lib/xmpp4r/muc/item.rb, line 129
129:       def actors=(a)
130:         delete_elements('actor')
131:         a.each { |jid|
132:           e = add_element('actor')
133:           e.attributes['jid'] = jid.to_s
134:         }
135:       end

[Source]

    # File lib/xmpp4r/muc/item.rb, line 11
11:       def affiliation
12:         case attributes['affiliation']
13:           when 'admin' then :admin
14:           when 'member' then :member
15:           when 'none' then :none
16:           when 'outcast' then :outcast
17:           when 'owner' then :owner
18:           else nil
19:         end
20:       end

[Source]

    # File lib/xmpp4r/muc/item.rb, line 22
22:       def affiliation=(v)
23:         case v
24:           when :admin then attributes['affiliation'] = 'admin'
25:           when :member then attributes['affiliation'] = 'member'
26:           when :none then attributes['affiliation'] = 'none'
27:           when :outcast then attributes['affiliation'] = 'outcast'
28:           when :owner then attributes['affiliation'] = 'owner'
29:           else attributes['affiliation'] = nil
30:         end
31:       end

[Source]

     # File lib/xmpp4r/muc/item.rb, line 105
105:       def continue
106:         c = nil
107:         each_element('continue') { |xe| c = xe }
108:         c.nil?
109:       end

[Source]

     # File lib/xmpp4r/muc/item.rb, line 111
111:       def continue=(c)
112:         delete_elements('continue')
113:         add_element('continue') if c
114:       end

[Source]

    # File lib/xmpp4r/muc/item.rb, line 38
38:       def jid
39:         attributes['jid'].nil? ? nil : JID.new(attributes['jid'])
40:       end

[Source]

    # File lib/xmpp4r/muc/item.rb, line 42
42:       def jid=(j)
43:         attributes['jid'] = j.nil? ? nil : j.to_s
44:       end

[Source]

    # File lib/xmpp4r/muc/item.rb, line 51
51:       def nick
52:         attributes['nick']
53:       end

[Source]

    # File lib/xmpp4r/muc/item.rb, line 55
55:       def nick=(n)
56:         attributes['nick'] = n
57:       end

[Source]

    # File lib/xmpp4r/muc/item.rb, line 89
89:       def reason
90:         text = nil
91:         each_element('reason') { |xe| text = xe.text }
92:         text
93:       end

[Source]

    # File lib/xmpp4r/muc/item.rb, line 95
95:       def reason=(s)
96:         delete_elements('reasion')
97:         add_element('reason').text = s
98:       end

[Source]

    # File lib/xmpp4r/muc/item.rb, line 64
64:       def role
65:         case attributes['role']
66:           when 'moderator' then :moderator
67:           when 'none' then :none
68:           when 'participant' then :participant
69:           when 'visitor' then :visitor
70:           else nil
71:         end
72:       end

[Source]

    # File lib/xmpp4r/muc/item.rb, line 74
74:       def role=(r)
75:         case r
76:           when :moderator then attributes['role'] = 'moderator'
77:           when :none then attributes['role'] = 'none'
78:           when :participant then attributes['role'] = 'participant'
79:           when :visitor then attributes['role'] = 'visitor'
80:           else attributes['role'] = nil
81:         end
82:       end

[Source]

     # File lib/xmpp4r/muc/item.rb, line 137
137:       def set_actors(a)
138:         self.actors = a
139:         self
140:       end

[Source]

    # File lib/xmpp4r/muc/item.rb, line 33
33:       def set_affiliation(v)
34:         self.affiliation = v
35:         self
36:       end

[Source]

     # File lib/xmpp4r/muc/item.rb, line 116
116:       def set_continue(c)
117:         self.continue = c
118:         self
119:       end

[Source]

    # File lib/xmpp4r/muc/item.rb, line 46
46:       def set_jid(j)
47:         self.jid = j
48:         self
49:       end

[Source]

    # File lib/xmpp4r/muc/item.rb, line 59
59:       def set_nick(n)
60:         self.nick = n
61:         self
62:       end

[Source]

     # File lib/xmpp4r/muc/item.rb, line 100
100:       def set_reason(s)
101:         self.reason = s
102:         self
103:       end

[Source]

    # File lib/xmpp4r/muc/item.rb, line 84
84:       def set_role(r)
85:         self.role = r
86:         self
87:       end

[Validate]