def clear_attribute(attribute)
      # the current value to clear
      current = send(attribute)
      return if current.nil?
      # call the current value clear if possible.
      # otherwise, set the attribute to the empty value.
      if current.respond_to?(:clear) then
        current.clear
      else
        writer = self.class.property(attribute).writer
        value = self.class.empty_value(attribute)
        send(writer, value)
      end
    end
def clear_attribute(attribute)
      # the current value to clear
      current = send(attribute)
      return if current.nil?
      # call the current value clear if possible.
      # otherwise, set the attribute to the empty value.
      if current.respond_to?(:clear) then
        current.clear
      else
        writer = self.class.property(attribute).writer
        value = self.class.empty_value(attribute)
        send(writer, value)
      end
    end
Clears the given attribute value. If the current value responds to the +clear+ method,
 then the current value is cleared. Otherwise, the value is set to {Metadata#empty_value}.

 @param [Symbol] attribute the attribute to clear