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
970205
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
1289982
def instance_set(attribute, value)
      setter = :"#{self.name}_#{attribute}="
      self.instance.send(setter, value) if instance.respond_to?(setter)
    end
592895
public void removeAttribute(String name) {
        if (name == null) {
            throw new NullPointerException("don't set a NULL named attribute");
        }
        synchronized (mutex) {
            window.remove(name);
            if (deleteAttributes == null) {
                deleteAttributes = new HashSet<String>(4);
                deleteAttributes.add(name);
            }
        }
    }
938935
def do_unset(self, attribute):
        '''
        
        '''
        self.abort_on_invalid_active_repo('unset')
        if not attribute:
            raise ShellError('command "unset" requires a non-empty attribute')
        self.network.unset(self.network.active_repo, attribute)
1019683
def DeleteAttribute(self, attribute):
    """"""
    if "w" not in self.mode:
      raise IOError("Deleting attribute %s from read only object." % attribute)

    # Check if this object should be locked in order to delete the attribute.
    # NOTE: We don't care about locking when doing blind writes.
    if self.mode != "w" and attribute.lock_protected and not self.transaction:
      raise IOError("Object must be locked to delete attribute %s." % attribute)

    if attribute in self.synced_attributes:
      self._to_delete.add(attribute)
      del self.synced_attributes[attribute]

    if attribute in self.new_attributes:
      del self.new_attributes[attribute]

    # Does this represent a new version?
    if attribute.versioned and attribute.creates_new_object_version:
      self._new_version = True

    self._dirty = True
398170
def destroy_key attribute, key
      raise "invalid attribute #{attribute}" unless self.class.column_names.include?(attribute.to_s)
      new_value = send(attribute)
      new_value.delete(key.to_s)
      send("#{attribute}=", new_value)
      self
    end
931745
public void clearAttributes ()
  {
    for (final Map.Entry <String, Object> entry : m_aAttributes.entrySet ())
    {
      final String sName = entry.getKey ();
      final Object aValue = entry.getValue ();
      if (aValue instanceof HttpSessionBindingListener)
        ((HttpSessionBindingListener) aValue).valueUnbound (new HttpSessionBindingEvent (this, sName, aValue));
    }
    m_aAttributes.clear ();
  }
48327
def _set_attribute_as_deprecated(attribute)
      original_attribute_method = instance_method(attribute.to_sym)

      klass = self
      define_method attribute.to_sym do |*args|
        backtrace_cleaner = ActiveSupport::BacktraceCleaner.new

        backtrace = backtrace_cleaner.clean(caller)

        klass._notify_deprecated_attribute_call({klass: self, attribute: attribute, args: args, backtrace: backtrace})

        # Call the original attribute method.
        original_attribute_method.bind(self).call(*args)
      end
    end
926163
def removeDefaultAttributeValue(node, attribute):
    
    if not node.hasAttribute(attribute.name):
        return 0

    # differentiate between text and numeric values
    if isinstance(attribute.value, str):
        if node.getAttribute(attribute.name) == attribute.value:
            if (attribute.conditions is None) or attribute.conditions(node):
                node.removeAttribute(attribute.name)
                return 1
    else:
        nodeValue = SVGLength(node.getAttribute(attribute.name))
        if ((attribute.value is None)
                or ((nodeValue.value == attribute.value) and not (nodeValue.units == Unit.INVALID))):
            if ((attribute.units is None)
                    or (nodeValue.units == attribute.units)
                    or (isinstance(attribute.units, list) and nodeValue.units in attribute.units)):
                if (attribute.conditions is None) or attribute.conditions(node):
                    node.removeAttribute(attribute.name)
                    return 1

    return 0
645746
public function removeAttribute(string $attribute)
    {
        if (empty($attribute)) {
            Throw new ColumnException('An empty attribute is not allowed.');
        }

        unset($this->attributes[$attribute]);
    }
392553
function removeAttribute(element, name) {
    element = getComponentNode(element) || element;
    let oldValue = element.getAttribute(name);
    element.removeAttribute(name);
    return update(element, name, oldValue, null);
}
411540
protected function purgeAttributes()
    {
        $attributes = $this->getPurgeAttributes();

        if ( ! empty($attributes) )
        {
            foreach ( $attributes as $attribute )
            {
                unset($this->attributes[$attribute]);
            }
        }
    }
1023271
def set_revision_meta_attribute(revision, attribute, value)
      case value
      when Symbol
        value = self.send(value)
      when Proc
        value = value.call(self)
      end
      revision.send("#{attribute}=", value)
    end
716000
public function clearAttributes()
    {
        $this->instanceWrite('file_name', null);
        $this->instanceWrite('file_size', null);
        $this->instanceWrite('content_type', null);
        $this->instanceWrite('updated_at', null);
        $this->instanceWrite('variants', null);
    }
1368723
def update_attributes(attrs)
      if id = attrs.delete(:id)
        @id = id
      end
      attrs.each do |key, value|
        setter = :"#{key}="
        send(setter, value) if respond_to?(setter)
      end
    end
822697
def clear_nil_attributes(hash)
      hash.reject! do |key, value|
        if value.nil?
          return true
        elsif value.is_a? Hash
          value.reject! { |inner_key, inner_value| inner_value.nil? }
        end

        false
      end

      hash
    end
615582
function(inName, inValue) {
		if (inValue === null || inValue === false || inValue === "") {
			this.node.removeAttribute(inName);
		} else {
			this.node.setAttribute(inName, inValue);
		}
	}