Module: Hobix::Out::XmlQuick
- Defined in:
- lib/hobix/out/atom.rb
Instance Method Summary collapse
Instance Method Details
#x(title, txt, attrs = nil) ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/hobix/out/atom.rb', line 25 def x( title, txt, attrs = nil ) e = REXML::Element.new title e.attributes['xml:space'] = "preserve" # self-quote to work around REXML quoting issues with HTML entities REXML::Text.new ::ERB::Util.h( txt ), true, e, true if txt attrs.each { |a,b| e.attributes[a] = b } if attrs self << e end |