Class: JytPay::Xml::MyPrecious
- Inherits:
-
REXML::Formatters::Pretty
- Object
- REXML::Formatters::Pretty
- JytPay::Xml::MyPrecious
- Defined in:
- lib/jyt_pay/xml/xml.rb
Overview
fix bug in REXML::Formatters::Pretty
Instance Method Summary collapse
Instance Method Details
#write_text(node, output) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/jyt_pay/xml/xml.rb', line 26 def write_text( node, output ) s = node.to_s() s.gsub!(/\s/,' ') s.squeeze!(" ") #The Pretty formatter code mistakenly used 80 instead of the @width variable s = wrap(s, @width-@level) s = indent_text(s, @level, " ", true) output << (' '*@level + s) end |