Class: REXML::Attributes
- Inherits:
-
Object
- Object
- REXML::Attributes
- Defined in:
- lib/sixarm_ruby_rexml/attributes.rb
Instance Method Summary collapse
-
#to_a_hash ⇒ Object
A new hash of the attributes’ name and value pairs.
Instance Method Details
#to_a_hash ⇒ Object
Returns a new hash of the attributes’ name and value pairs.
8 9 10 |
# File 'lib/sixarm_ruby_rexml/attributes.rb', line 8 def to_a_hash to_a.inject({}){|hash, attribute| hash[attribute.name]=attribute.value; hash} end |