Class: Peddler::Parsers::Collection

Inherits:
XML
  • Object
show all
Includes:
Enumerable
Defined in:
lib/peddler/parsers/collection.rb

Instance Attribute Summary

Attributes inherited from Base

#document

Instance Method Summary collapse

Methods inherited from XML

#at_xpath, handle?, #xpath

Methods inherited from Base

handle?, #initialize

Constructor Details

This class inherits a constructor from Peddler::Parsers::Base

Instance Method Details

#eachObject

Raises:

  • (NotImplementedError)


8
9
10
# File 'lib/peddler/parsers/collection.rb', line 8

def each
  raise NotImplementedError
end

#empty?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/peddler/parsers/collection.rb', line 12

def empty?
  count == 0
end

#inspectObject Also known as: to_s



16
17
18
# File 'lib/peddler/parsers/collection.rb', line 16

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