Module: Krikri::OaiParserHeaders

Extended by:
ActiveSupport::Concern
Included in:
OaiDcParser
Defined in:
lib/krikri/parsers/oai_parser_headers.rb

Overview

Concern for Krikri::XmlParsers with oai-style headers

Examples:

class MyOaiParser < Krikri::XmlParser
  include Krikri::OaiParserHeaders
end

Instance Method Summary collapse

Instance Method Details

#headerKrikri::Parser::ValueArray

Returns a ValueArray containing the header node as a `Value` of this parser class

Returns:


14
15
16
17
18
# File 'lib/krikri/parsers/oai_parser_headers.rb', line 14

def header
  header_node = Nokogiri::XML(record.to_s).at_xpath('//xmlns:header')
  Krikri::Parser::ValueArray
    .new([self.class::Value.new(header_node, root.namespaces)])
end