Module: Puree::XMLExtractor::EventMixin
- Included in:
- ConferencePaper
- Defined in:
- lib/puree/xml_extractor/mixins/event_mixin.rb
Overview
Event extractor mixin.
Instance Method Summary collapse
Instance Method Details
#event ⇒ Puree::Model::EventHeader?
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/puree/xml_extractor/mixins/event_mixin.rb', line 10 def event xpath_result = xpath_query '/event' if !xpath_result.empty? header = Puree::Model::EventHeader.new header.uuid = xpath_result.xpath('@uuid').text.strip xpath_result_name = xpath_result.xpath('names/name') header.title = xpath_result_name.first.text.strip unless xpath_result_name.empty? return header if header.data? end nil end |