class LibXML::XML::Attributes

def to_h

def to_h
  inject({}) do |hash, attr|
    hash[attr.name] = attr.value
    hash
  end
end