Sha256: fc0bfa87400cde63cb9e93bb6ce446b562930c7dc6c6ef51f11fb0e3acb7af46

Contents?: true

Size: 563 Bytes

Versions: 15

Compression:

Stored size: 563 Bytes

Contents

module Puree

  module XMLExtractor

    # Publisher XML extractor.
    #
    class Publisher < Puree::XMLExtractor::Resource
      include Puree::XMLExtractor::TypeMixin

      def initialize(xml)
        super
        setup_model :publisher
      end

      # @return [String, nil]
      def name
        xpath_query_for_single_value '/name'
      end

      private

      def xpath_root
        '/publisher'
      end

      def combine_metadata
        super
        @model.name = name
        @model.type = type
        @model
      end

    end

  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
puree-2.9.2 lib/puree/xml_extractor/publisher.rb
puree-2.9.1 lib/puree/xml_extractor/publisher.rb
puree-2.9.0 lib/puree/xml_extractor/publisher.rb
puree-2.8.1 lib/puree/xml_extractor/publisher.rb
puree-2.8.0 lib/puree/xml_extractor/publisher.rb
puree-2.7.0 lib/puree/xml_extractor/publisher.rb
puree-2.6.0 lib/puree/xml_extractor/publisher.rb
puree-2.5.1 lib/puree/xml_extractor/publisher.rb
puree-2.5.0 lib/puree/xml_extractor/publisher.rb
puree-2.4.0 lib/puree/xml_extractor/publisher.rb
puree-2.3.0 lib/puree/xml_extractor/publisher.rb
puree-2.2.0 lib/puree/xml_extractor/publisher.rb
puree-2.1.1 lib/puree/xml_extractor/publisher.rb
puree-2.1.0 lib/puree/xml_extractor/publisher.rb
puree-2.0.0 lib/puree/xml_extractor/publisher.rb