Module: Blather::Stanza::MUC::MUCUserBase
- Included in:
- Blather::Stanza::Message::MUCUser, Presence::MUCUser
- Defined in:
- lib/blather/stanza/muc/muc_user_base.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- MUC_USER_NAMESPACE =
"http://jabber.org/protocol/muc#user"
Class Method Summary collapse
Instance Method Summary collapse
- #find_password_node ⇒ Object
- #inherit(node) ⇒ Object
- #muc_user ⇒ Object
- #password ⇒ Object
- #password=(var) ⇒ Object
- #password_node ⇒ Object
Class Method Details
.included(klass) ⇒ Object
8 9 10 |
# File 'lib/blather/stanza/muc/muc_user_base.rb', line 8 def self.included(klass) klass.extend ClassMethods end |
Instance Method Details
#find_password_node ⇒ Object
47 48 49 |
# File 'lib/blather/stanza/muc/muc_user_base.rb', line 47 def find_password_node muc_user.find_first 'ns:password', :ns => MUC_USER_NAMESPACE end |
#inherit(node) ⇒ Object
18 19 20 21 22 |
# File 'lib/blather/stanza/muc/muc_user_base.rb', line 18 def inherit(node) muc_user.remove super self end |
#muc_user ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/blather/stanza/muc/muc_user_base.rb', line 32 def muc_user unless muc_user = find_first('ns:x', :ns => MUC_USER_NAMESPACE) self << (muc_user = XMPPNode.new('x', self.document)) muc_user.namespace = self.class.registered_ns end muc_user end |
#password ⇒ Object
24 25 26 |
# File 'lib/blather/stanza/muc/muc_user_base.rb', line 24 def password find_password_node && password_node.content end |
#password=(var) ⇒ Object
28 29 30 |
# File 'lib/blather/stanza/muc/muc_user_base.rb', line 28 def password=(var) password_node.content = var end |