Sha256: db8a026d1799850d07b6a3eee3acf981df258bb6b411f4fb2e87f28ebb103612

Contents?: true

Size: 537 Bytes

Versions: 1

Compression:

Stored size: 537 Bytes

Contents

require 'mws/orders/document'

module MWS
  module Orders
    class Collection < Document
      include Enumerable

      def each
        raise NotImplementedError
      end

      def empty?
        count.zero?
      end

      def inspect
        "#<#{self.class} #{if count > 3
                             "[#{take(3).map(&:inspect).join(', ')}...]"
                           else
                             "[#{map(&:inspect).join(', ')}]"
                           end}>"
      end

      alias to_s inspect
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mws-orders-0.2.2 lib/mws/orders/collection.rb