Class: Jabber::MUC::XMUC
- Inherits:
-
X
- Object
- REXML::Element
- X
- Jabber::MUC::XMUC
- Defined in:
- lib/xmpp4r/muc/x/muc.rb
Overview
Class for <x/> elements with namespace jabber.org/protocol/muc
See JEP-0045 for details
Instance Method Summary collapse
-
#initialize ⇒ XMUC
constructor
Initialize an <x/> element and set namespace to jabber.org/protocol/muc.
-
#password ⇒ Object
Text content of the
<password/>
element. -
#password=(s) ⇒ Object
Set the password for joining a room (text content of the
<password/>
element).
Methods inherited from X
Methods inherited from REXML::Element
#delete_elements, #first_element, #first_element_text, #import, import, #replace_element_text, #typed_add
Constructor Details
#initialize ⇒ XMUC
Initialize an <x/> element and set namespace to jabber.org/protocol/muc
19 20 21 22 |
# File 'lib/xmpp4r/muc/x/muc.rb', line 19 def initialize super add_namespace('http://jabber.org/protocol/muc') end |
Instance Method Details
#password ⇒ Object
Text content of the <password/>
element
26 27 28 |
# File 'lib/xmpp4r/muc/x/muc.rb', line 26 def password first_element_text('password') end |
#password=(s) ⇒ Object
Set the password for joining a room (text content of the <password/>
element)
33 34 35 36 37 38 39 |
# File 'lib/xmpp4r/muc/x/muc.rb', line 33 def password=(s) if s replace_element_text('password', s) else delete_elements('password') end end |