Module: Exlibris::Primo::WebService::Response::Records

Included in:
GetEshelf, Search
Defined in:
lib/exlibris/primo/web_service/response/records.rb

Instance Method Summary collapse

Instance Method Details

#recordsObject



6
7
8
9
10
11
12
# File 'lib/exlibris/primo/web_service/response/records.rb', line 6

def records
  @records ||= xml.xpath("//pnx:record", response_namespaces).collect { |record|
      Exlibris::Primo::Record.new(:raw_xml => record.to_xml) }
  # @records ||= Hash[xml.xpath("//pnx:record", response_namespaces).collect { |record|
  #   [ record.xpath("//pnx:record_id", response_namespaces).inner_text,
  #     Exlibris::Primo::Record.new(:raw_xml => record.to_xml) ]}]
end