Class: MWS::MerchantFulfillment::Collection

Inherits:
Document
  • Object
show all
Includes:
Enumerable
Defined in:
lib/mws/merchant_fulfillment/collection.rb

Direct Known Subclasses

ShippingServices

Instance Attribute Summary

Attributes inherited from Document

#node

Instance Method Summary collapse

Methods inherited from Document

#initialize, #xpath

Constructor Details

This class inherits a constructor from MWS::MerchantFulfillment::Document

Instance Method Details

#eachObject

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/mws/merchant_fulfillment/collection.rb', line 10

def each
  raise NotImplementedError
end

#empty?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/mws/merchant_fulfillment/collection.rb', line 14

def empty?
  count.zero?
end

#inspectObject Also known as: to_s



18
19
20
21
22
23
24
# File 'lib/mws/merchant_fulfillment/collection.rb', line 18

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