def attr(selector, attributes_or_attribute_name, value = nil)
      attributes = attributes_or_attribute_name.to_effigy_attributes(value)
      select(selector).each do |element|
        element.merge!(attributes)
      end
    end
def attr(selector, attributes_or_attribute_name, value = nil)
      attributes = attributes_or_attribute_name.to_effigy_attributes(value)
      select(selector).each do |element|
        element.merge!(attributes)
      end
    end
Adds or updates the given attribute or attributes of the selected elements.

 @param [String] selector a CSS or XPath string describing the elements to
   transform
 @param [String,Hash] attributes_or_attribute_name if a String, replaces
   that attribute with the given value. If a Hash, uses the keys as
   attribute names and values as attribute values
 @param [String] value the value for the replaced attribute. Used only if
   attributes_or_attribute_name is a String
 @example
   attr('p', :id => 'an_id', :style => 'display: none')
   attr('p', :id, 'an_id')
   find('p').attr(:id, 'an_id')