class Hpricot::Elem

def haml_attributes(options)

that's prettier than that produced by Hash#inspect
Returns a string representation of an attributes hash
def haml_attributes(options)
  attrs = attr_hash.sort.map do |name, value|
    value = dynamic_attribute?(name, options) ? dynamic_attributes[name] : value.inspect
    name = name.index(/\W/) ? name.inspect : ":#{name}"
    "#{name} => #{value}"
  end
  "{#{attrs.join(', ')}}"
end