Object
# File lib/eim_xml.rb, line 31 31: def self.[](obj) 32: obj.is_a?(PCString) ? obj : PCString.new(obj) 33: end
# File lib/eim_xml.rb, line 14 14: def self.encode(s) 15: s.to_s.gsub(/[&\"\'<>]/) do |m| 16: case m 17: when "&" 18: "&" 19: when '"' 20: """ 21: when "'" 22: "'" 23: when "<" 24: "<" 25: when ">" 26: ">" 27: end 28: end 29: end
# File lib/eim_xml.rb, line 35 35: def initialize(s, encoded=false) 36: @src = s 37: @encoded_string = encoded ? s : PCString.encode(s) 38: end
# File lib/eim_xml.rb, line 40 40: def ==(other) 41: other.is_a?(PCString) ? @encoded_string==other.encoded_string : self==PCString.new(other) 42: end
# File lib/eim_xml.rb, line 44 44: def write_to(out="") 45: out << encoded_string 46: end
Disabled; run with --debug to generate this.
[Validate]
Generated with the Darkfish Rdoc Generator 1.1.6.