class Fieldhand::ListRecordsParser
A parser for ListRecords responses.
See www.openarchives.org/OAI/openarchivesprotocol.html#ListRecords
Attributes
response_parser[R]
Public Class Methods
new(response_parser)
click to toggle source
Return a parser for the given response body.
# File lib/fieldhand/list_records_parser.rb, line 13 def initialize(response_parser) @response_parser = response_parser end
Public Instance Methods
items()
click to toggle source
Return an array of `Record`s found in the response.
# File lib/fieldhand/list_records_parser.rb, line 18 def items response_parser. root. locate('ListRecords/record'). map { |item| Record.new(item, response_parser.response_date) } end