Don't use this. It is the base class (unifying shared attributes) of XMUCUserItem and IqQueryMUCAdminItem
# File lib/xmpp4r/muc/item.rb, line 121 def actors a = [] each_element('actor') { |xe| a.push(JID.new(xe.attributes['jid'])) } a end
# File lib/xmpp4r/muc/item.rb, line 129 def actors=(a) delete_elements('actor') a.each { |jid| e = add_element('actor') e.attributes['jid'] = jid.to_s } end
# File lib/xmpp4r/muc/item.rb, line 11 def affiliation case attributes['affiliation'] when 'admin' then :admin when 'member' then :member when 'none' then :none when 'outcast' then :outcast when 'owner' then :owner else nil end end
# File lib/xmpp4r/muc/item.rb, line 22 def affiliation=(v) case v when :admin then attributes['affiliation'] = 'admin' when :member then attributes['affiliation'] = 'member' when :none then attributes['affiliation'] = 'none' when :outcast then attributes['affiliation'] = 'outcast' when :owner then attributes['affiliation'] = 'owner' else attributes['affiliation'] = nil end end
# File lib/xmpp4r/muc/item.rb, line 105 def continue c = nil each_element('continue') { |xe| c = xe } c.nil? end
# File lib/xmpp4r/muc/item.rb, line 111 def continue=(c) delete_elements('continue') add_element('continue') if c end
# File lib/xmpp4r/muc/item.rb, line 38 def jid attributes['jid'].nil? ? nil : JID.new(attributes['jid']) end
# File lib/xmpp4r/muc/item.rb, line 42 def jid=(j) attributes['jid'] = j.nil? ? nil : j.to_s end
# File lib/xmpp4r/muc/item.rb, line 51 def nick attributes['nick'] end
# File lib/xmpp4r/muc/item.rb, line 55 def nick=(n) attributes['nick'] = n end
# File lib/xmpp4r/muc/item.rb, line 89 def reason text = nil each_element('reason') { |xe| text = xe.text } text end
# File lib/xmpp4r/muc/item.rb, line 95 def reason=(s) delete_elements('reasion') add_element('reason').text = s end
# File lib/xmpp4r/muc/item.rb, line 64 def role case attributes['role'] when 'moderator' then :moderator when 'none' then :none when 'participant' then :participant when 'visitor' then :visitor else nil end end
# File lib/xmpp4r/muc/item.rb, line 74 def role=(r) case r when :moderator then attributes['role'] = 'moderator' when :none then attributes['role'] = 'none' when :participant then attributes['role'] = 'participant' when :visitor then attributes['role'] = 'visitor' else attributes['role'] = nil end end
# File lib/xmpp4r/muc/item.rb, line 137 def set_actors(a) self.actors = a self end
# File lib/xmpp4r/muc/item.rb, line 33 def set_affiliation(v) self.affiliation = v self end
# File lib/xmpp4r/muc/item.rb, line 116 def set_continue(c) self.continue = c self end
# File lib/xmpp4r/muc/item.rb, line 46 def set_jid(j) self.jid = j self end
# File lib/xmpp4r/muc/item.rb, line 59 def set_nick(n) self.nick = n self end
# File lib/xmpp4r/muc/item.rb, line 100 def set_reason(s) self.reason = s self end
# File lib/xmpp4r/muc/item.rb, line 84 def set_role(r) self.role = r self end