Class: REXML::Document

Inherits:
Object show all
Defined in:
lib/sequence_logo/ytilib/hack1.rb

Instance Method Summary collapse

Instance Method Details

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



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/sequence_logo/ytilib/hack1.rb', line 59

def write( output=$stdout, indent=-1, trans=false, ie_hack=false )
  if xml_decl.encoding != "UTF-8" && !output.kind_of?(Output)
    output = Output.new( output, xml_decl.encoding )
  end
  formatter = if indent > -1
      if trans
        REXML::Formatters::Transitive.new( indent )
      else
        REXML::Formatters::Pretty.new( indent, ie_hack )
      end
    else
      REXML::Formatters::Default.new( ie_hack )
    end
  formatter.write( self, output )
end