File: attributes.rb

package info (click to toggle)
ruby-libxml 2.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,812 kB
  • sloc: xml: 9,628; ruby: 7,119; ansic: 6,665; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 223 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# encoding: UTF-8

module LibXML
  module XML
    class Attributes
      def to_h
        inject({}) do |hash, attr|
          hash[attr.name] = attr.value
          hash
        end
      end
    end
  end
end