Method: REXML::Attributes#each

Defined in:
lib/rexml/element.rb

#each ⇒ Object

Iterates over each attribute of an Element, yielding the expanded name and value as a pair of Strings.

doc = Document.new '' doc.root.attributes.each {|name, value| p name+" => "+value }



1025
1026
1027
1028
1029
# File 'lib/rexml/element.rb', line 1025

def each
  each_attribute do |attr|
    yield [attr.expanded_name, attr.value]
  end
end