Sha256: a4a5dbf6f7544c6032eaa67cc1b9a3da89ded95236f58a66c0e270532edb9326
Contents?: true
Size: 586 Bytes
Versions: 8
Compression:
Stored size: 586 Bytes
Contents
require 'pump/xml/node' module Pump class Xml class Value < Node attr_accessor :options def plain "object.#{name}" end def to_s(plain_path=nil) "\#{#{remove_ilegal_chars}#{plain_path || plain}#{cast}}" end private def cast if options[:typecast] ".#{options[:typecast]}" elsif !options[:xmlsafe] '.to_s.encode(:xml => :text)' end end def remove_ilegal_chars "remove_ilegal_chars " if !options[:typecast] && !options[:xmlsafe] end end end end
Version data entries
8 entries across 8 versions & 1 rubygems