Class: MWS::Feeds::Collection

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

Direct Known Subclasses

FeedSubmissionList, ResultList

Instance Attribute Summary

Attributes inherited from Document

#namespace, #node

Instance Method Summary collapse

Methods inherited from Document

#initialize, #xpath

Constructor Details

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

Instance Method Details

#eachObject

Raises:

  • (NotImplementedError)


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

def each
  raise NotImplementedError
end

#empty?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/mws/feeds/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/feeds/collection.rb', line 18

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