Method: REXML::Node#to_s
- Defined in:
- lib/rexml/node.rb
#to_s(indent = nil) ⇒ Object
- indent
-
DEPRECATED This parameter is now ignored. See the formatters in the REXML::Formatters package for changing the output style.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rexml/node.rb', line 27 def to_s indent=nil unless indent.nil? Kernel.warn( "#{self.class.name}#to_s(indent) parameter is deprecated", uplevel: 1) f = REXML::Formatters::Pretty.new( indent ) f.write( self, rv = "" ) else f = REXML::Formatters::Default.new f.write( self, rv = "" ) end return rv end |