Class: REXML::Attributes

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

Overview

REXML::Attributes extensions

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"}


150
151
152
153
154
# File 'lib/webget_ruby_ramp/xml.rb', line 150

def to_hash
  h=Hash.new
  self.keys.each{|k| h[k]=self[k]}
  h
end