Class: REXML::Attributes

Inherits:
Object
  • Object
show all
Defined in:
lib/violet/helpers.rb

Overview

REXML::Attributes#to_hash seems to be broken.

Instance Method Summary collapse

Instance Method Details

#to_hashObject

convert attributes to an instance of Hash.



18
19
20
21
22
# File 'lib/violet/helpers.rb', line 18

def to_hash
  h = Hash.new
  self.each { |key,value| h[key.to_sym] = value }
  h
end

#to_hash_oldObject



14
# File 'lib/violet/helpers.rb', line 14

alias :to_hash_old :to_hash