Class: REXML::Document

Inherits:
Object
  • Object
show all
Defined in:
lib/sixarm_ruby_rexml/document.rb

Instance Method Summary collapse

Instance Method Details

#remove_attributesObject

Remove all attributes from the document’s elements.

Returns:

  • the document.

See Also:



9
10
11
12
# File 'lib/sixarm_ruby_rexml/document.rb', line 9

def remove_attributes
  self.elements.each("//") { |elem| elem.attributes.each_attribute{|attribute| attribute.remove }}
  self
end