Class: REXML::Attributes

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

Instance Method Summary collapse

Instance Method Details

#to_hashObject

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