Sha256: 82a2aedc250b8b2d59f71d74ced5e7f8003d605328997326b30dde191c6a21ae

Contents?: true

Size: 335 Bytes

Versions: 6

Compression:

Stored size: 335 Bytes

Contents

require 'peddler/parsers/xml'

module Peddler
  module Parsers
    class Collection < XML
      include Enumerable

      def each
        raise NotImplementedError
      end

      def empty?
        count == 0
      end

      def inspect
        "#<#{self.class} (#{count})>"
      end

      alias :to_s :inspect
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
peddler-0.6.5 lib/peddler/parsers/collection.rb
peddler-0.6.4 lib/peddler/parsers/collection.rb
peddler-0.6.3 lib/peddler/parsers/collection.rb
peddler-0.6.2 lib/peddler/parsers/collection.rb
peddler-0.6.1 lib/peddler/parsers/collection.rb
peddler-0.6.0 lib/peddler/parsers/collection.rb