class Hpricot::CssProxy
def method_missing(id_or_class, *args, &block)
Adds attributes to an element. Bang methods set the :id attribute.
def method_missing(id_or_class, *args, &block) if (idc = id_or_class.to_s) =~ /!$/ @attrs[:id] = $` else @attrs[:class] = @attrs[:class].nil? ? idc : "#{@attrs[:class]} #{idc}".strip end if block or args.any? args.push(@attrs) return @builder.tag!(@sym, *args, &block) end return self end