class Hpricot::BaseEle
def self.alterable(*fields)
def self.alterable(*fields) attr_accessor(*fields) fields.each do |f| define_method("#{f}=") do |v| altered! instance_variable_set("@#{f}", v) end end end
def altered!
def altered! @raw_string = nil end
def html_quote(str)
def html_quote(str) "\"" + str.gsub('"', '\\"') + "\"" end
def if_output(opts)
def if_output(opts) if opts[:preserve] and not @raw_string.nil? @raw_string else yield opts end end
def pathname; self.name end
def pathname; self.name end