method
ensure_xml_content
v1_9_3_392 -
Show latest stable
-
0 notes -
Class: RSS::Maker::AtomTextConstructBase::EnsureXMLContent
ensure_xml_content(content)
public
Hide source
# File lib/rss/maker/base.rb, line 308 def ensure_xml_content(content) xhtml_uri = ::RSS::Atom::XHTML_URI unless content.is_a?(RSS::XML::Element) and ["div", xhtml_uri] == [content.name, content.uri] children = content children = [children] unless content.is_a?(Array) children = set_xhtml_uri_as_default_uri(children) content = RSS::XML::Element.new("div", nil, xhtml_uri, {"xmlns" => xhtml_uri}, children) end content end