Class: MWS::Feeds::Collection
- Inherits:
-
Document
show all
- Includes:
- Enumerable
- Defined in:
- lib/mws/feeds/collection.rb
Instance Attribute Summary
Attributes inherited from Document
#namespace, #node
Instance Method Summary
collapse
Methods inherited from Document
#initialize, #xpath
Instance Method Details
#each ⇒ Object
10
11
12
|
# File 'lib/mws/feeds/collection.rb', line 10
def each
raise NotImplementedError
end
|
#empty? ⇒ Boolean
14
15
16
|
# File 'lib/mws/feeds/collection.rb', line 14
def empty?
count.zero?
end
|
#inspect ⇒ Object
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
|