diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2011-08-19 03:09:35 +0200 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2011-08-19 03:09:35 +0200 |
commit | 75bc5455af8c3c3381066aac3d5fff42264cac6f (patch) | |
tree | 589d2c912ddd94c517eb794bcdf3257f8348f3c0 /lib/coderay/encoders/xml.rb | |
parent | fdd17b6a09efb275238a3baef275465d31452f2a (diff) | |
download | coderay-75bc5455af8c3c3381066aac3d5fff42264cac6f.tar.gz |
Major rewrite of encoders to support IO output; fixed some minor scanner bugs; cleanups; dropped NitroXHTML scanner; improved tests
Diffstat (limited to 'lib/coderay/encoders/xml.rb')
-rw-r--r-- | lib/coderay/encoders/xml.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/coderay/encoders/xml.rb b/lib/coderay/encoders/xml.rb index f2e7c02..3d306a6 100644 --- a/lib/coderay/encoders/xml.rb +++ b/lib/coderay/encoders/xml.rb @@ -10,7 +10,7 @@ module Encoders FILE_EXTENSION = 'xml' - require 'rexml/document' + autoload :REXML, 'rexml/document' DEFAULT_OPTIONS = { :tab_width => 8, @@ -20,6 +20,8 @@ module Encoders protected def setup options + super + @doc = REXML::Document.new @doc << REXML::XMLDecl.new @tab_width = options[:tab_width] @@ -27,9 +29,9 @@ module Encoders end def finish options - @out = '' @doc.write @out, options[:pretty], options[:transitive], true - @out + + super end public |