Class: REXML::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/assert2/xpath.rb

Instance Method Summary collapse

Instance Method Details

#write(output = $stdout, indent = -1,, transitive = false, ie_hack = false) ⇒ Object



192
193
194
195
196
197
198
199
200
201
202
203
204
205
# File 'lib/assert2/xpath.rb', line 192

def write(output=$stdout, indent=-1, transitive=false, ie_hack=false)
  Kernel.warn("#{self.class.name}.write is deprecated.  See REXML::Formatters")
  formatter = if indent > -1
      if transitive
        require "rexml/formatters/transitive"
        REXML::Formatters::Transitive.new( indent, ie_hack )
      else
        REXML::Formatters::Pretty.new( indent, ie_hack )
      end
    else
      REXML::Formatters::Default.new( ie_hack )
    end
  formatter.write( self, output )
end