source: extensions/gsdl-video/trunk/installed/cmdline/lib/ruby/1.8/rexml/output.rb@ 18425

Last change on this file since 18425 was 18425, checked in by davidb, 15 years ago

Video extension to Greenstone

File size: 385 bytes
Line 
1require 'rexml/encoding'
2
3module REXML
4 class Output
5 include Encoding
6
7 attr_reader :encoding
8
9 def initialize real_IO, encd="iso-8859-1"
10 @output = real_IO
11 self.encoding = encd
12
13 @to_utf = encd == UTF_8 ? false : true
14 end
15
16 def <<( content )
17 @output << (@to_utf ? self.encode(content) : content)
18 end
19
20 def to_s
21 "Output[#{encoding}]"
22 end
23 end
24end
Note: See TracBrowser for help on using the repository browser.