Module: AgentXmpp::Xmpp::XParent
Overview
Instance Method Summary collapse
-
#x(wanted_xmlns = nil) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
Instance Method Details
#x(wanted_xmlns = nil) ⇒ Object
.….….….….….….….….….….….….….….….….….….….….….….….….……
17 18 19 20 21 22 |
# File 'lib/agent_xmpp/xmpp/x_data.rb', line 17 def x(wanted_xmlns=nil) if wanted_xmlns.kind_of? Class and wanted_xmlns.ancestors.include? Element wanted_xmlns = wanted_xmlns.new.namespace end elements.to_a('x').select{|x| wanted_xmlns.nil? or wanted_xmlns == x.namespace}.first end |