Module: Puree::XMLExtractor::PublisherMixin

Included in:
Dataset, Journal, Thesis
Defined in:
lib/puree/xml_extractor/mixins/publisher_mixin.rb

Overview

Publisher extractor mixin.

Instance Method Summary collapse

Instance Method Details

#publisherPuree::Model::PublisherHeader?



10
11
12
13
14
15
16
17
# File 'lib/puree/xml_extractor/mixins/publisher_mixin.rb', line 10

def publisher
  xpath_result = xpath_query '/publisher'
  h = Puree::Model::PublisherHeader.new
  h.uuid = xpath_result.xpath('@uuid').text.strip
  h.name = xpath_result.xpath('name').text.strip
  h.type = xpath_result.xpath('type').text.strip
  h.data? ? h : nil
end