Class: REXML::Attributes
Instance Method Summary collapse
-
#to_hash ⇒ Object
Return a new hash of the attribute keys and values.
Instance Method Details
#to_hash ⇒ Object
Return a new hash of the attribute keys and values.
Example
attributes.to_hash => {"src"=>"pic.jpg", "height" => "100", "width" => "200"}
144 145 146 147 148 |
# File 'lib/webget_ramp/xml.rb', line 144 def to_hash h=Hash.new self.keys.each{|k| h[k]=self[k]} h end |