class Fieldhand::GetRecordParser
A parser for GetRecord responses
See www.openarchives.org/OAI/openarchivesprotocol.html#GetRecord
Attributes
response_parser[R]
Public Class Methods
new(response_parser)
click to toggle source
Return a new parser populated with the given response parser.
# File lib/fieldhand/get_record_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/get_record_parser.rb, line 18 def items response_parser. root. locate('GetRecord/record'). map { |item| Record.new(item, response_parser.response_date) } end