Sha256: 29e7b917f297d759a4ef664395a361b0350b8c23b0836062226f4c35d9e16852

Contents?: true

Size: 277 Bytes

Versions: 5

Compression:

Stored size: 277 Bytes

Contents

require 'nokogiri'

module Nokogiri
  module XML
    class Document < Node

      #
      # Returns the total count of all sub-children of the document.
      #
      def total_children
        return 0 unless root

        1 + root.total_children
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ronin-web-0.2.1 lib/ronin/web/extensions/nokogiri/xml/document.rb
ronin-web-0.2.0 lib/ronin/web/extensions/nokogiri/xml/document.rb
ronin-web-0.1.3 lib/ronin/web/extensions/nokogiri/xml/document.rb
ronin-web-0.1.2 lib/ronin/web/extensions/nokogiri/xml/document.rb
ronin-web-0.1.1 lib/ronin/web/extensions/nokogiri/xml/document.rb