Class: OAI::ListSetsResponse

Inherits:
Response show all
Includes:
Enumerable, XPath
Defined in:
lib/oai/client/list_sets.rb

Overview

allows for iteration of the sets found in a oai-pmh server

for set in client.list_sets
  puts set
end

Instance Attribute Summary

Attributes inherited from Response

#doc, #resumption_token

Instance Method Summary collapse

Methods included from XPath

#get_attribute, #xpath, #xpath_all, #xpath_first

Methods inherited from Response

#initialize

Constructor Details

This class inherits a constructor from OAI::Response

Instance Method Details

#eachObject



13
14
15
16
17
# File 'lib/oai/client/list_sets.rb', line 13

def each
  for set_element in xpath_all(@doc, './/set')
    yield OAI::Set.parse(set_element)
  end
end