Sha256: 919a6a109752b48ea0a6957568c8b00b93f72d2641533712850ee32756950ac6
Contents?: true
Size: 1.04 KB
Versions: 23
Compression:
Stored size: 1.04 KB
Contents
module Blather class Stanza class MUC module MUCUserBase MUC_USER_NAMESPACE = "http://jabber.org/protocol/muc#user" def self.included(klass) klass.extend ClassMethods end module ClassMethods def new(*args) super.tap { |e| e.muc_user } end end def inherit(node) muc_user.remove super self end def password find_password_node && password_node.content end def password=(var) password_node.content = var end 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 def password_node unless pw = find_password_node muc_user << (pw = XMPPNode.new('password', self.document)) end pw end def find_password_node muc_user.find_first 'ns:password', :ns => MUC_USER_NAMESPACE end end # MUCUserBase end # MUC end # Stanza end # Blather
Version data entries
23 entries across 23 versions & 2 rubygems