Sha256: 0d58fd191d646f68c2928827f1acded70882299e3e39541261949064f296d258

Contents?: true

Size: 372 Bytes

Versions: 3

Compression:

Stored size: 372 Bytes

Contents

module Nokogiri
  module XML
    class Reader
      include Enumerable

      def attributes
        Hash[*(attribute_nodes.map { |node|
          [node.name, node.to_s]
        }.flatten)].merge(namespaces || {})
      end

      def each(&block)
        while node = self.read
          block.call(node)
        end
      end
      private :initialize
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nokogiri-1.1.1-java lib/nokogiri/xml/reader.rb
nokogiri-1.1.1-x86-mswin32-60 lib/nokogiri/xml/reader.rb
nokogiri-1.1.1 lib/nokogiri/xml/reader.rb