Method: REXML::Attributes#delete_all

Defined in:
lib/rexml/element.rb

#delete_all(name) ⇒ Object

Deletes all attributes matching a name. Namespaces are significant.

name

A String; all attributes that match this path will be removed

Returns

an Array of the Attributes that were removed



1212
1213
1214
1215
1216
1217
1218
1219
# File 'lib/rexml/element.rb', line 1212

def delete_all( name )
  rv = []
  each_attribute { |attribute|
    rv << attribute if attribute.expanded_name == name
  }
  rv.each{ |attr| attr.remove }
  return rv
end