Class: REXML::Document

Inherits:
Object show all
Defined in:
lib/webget_ruby_ramp/xml.rb

Overview

REXML::Document extensions

Instance Method Summary collapse

Instance Method Details

#remove_attributesObject

Remove all attributes from the document’s elements.

Returns:

  • the document.

See Also:



179
180
181
182
# File 'lib/webget_ruby_ramp/xml.rb', line 179

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