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.

Return the document.

cf. Element#remove_attributes



169
170
171
172
# File 'lib/webget_ruby_ramp/xml.rb', line 169

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