Class: Jabber::MUC::XMUC

Inherits:
X show all
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

Methods inherited from XMPPElement

class_for_name_xmlns, #clone, force_xmlns, force_xmlns?, import, #initialize, name_xmlns, name_xmlns_for_class, #parent=, #set_xml_lang, #typed_add, #xml_lang, #xml_lang=

Methods inherited from REXML::Element

#==, #delete_elements, #each_elements, #first_element, #first_element_content, #first_element_text, #import, import, #replace_element_content, #replace_element_text, #typed_add

Constructor Details

This class inherits a constructor from Jabber::XMPPElement

Instance Method Details

#passwordObject

Text content of the <password/> element



20
21
22
# File 'lib/xmpp4r/muc/x/muc.rb', line 20

def password
  first_element_text('password')
end

#password=(s) ⇒ Object

Set the password for joining a room (text content of the <password/> element)



27
28
29
30
31
32
33
# File 'lib/xmpp4r/muc/x/muc.rb', line 27

def password=(s)
  if s
    replace_element_text('password', s)
  else
    delete_elements('password')
  end
end