class Pump::Xml::Value

Attributes

options[RW]

Public Instance Methods

plain() click to toggle source
# File lib/pump/xml/value.rb, line 8
def plain
  "object.#{name}"
end
to_s(plain_path=nil) click to toggle source
# File lib/pump/xml/value.rb, line 12
def to_s(plain_path=nil)
  "\#{#{remove_ilegal_chars}#{plain_path || plain}#{cast}}"
end

Private Instance Methods

cast() click to toggle source
# File lib/pump/xml/value.rb, line 18
def cast
  if options[:typecast]
    ".#{options[:typecast]}"
  elsif !options[:xmlsafe]
    '.to_s.encode(:xml => :text)'
  end
end
remove_ilegal_chars() click to toggle source
# File lib/pump/xml/value.rb, line 26
def remove_ilegal_chars
  "remove_ilegal_chars " if !options[:typecast] && !options[:xmlsafe]
end