class Hpricot::Elem
def haml_attributes(options)
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