Sha256: e30c5457a751590158c3472064579e6c64593c899da3110343bba2c08860fb45

Contents?: true

Size: 410 Bytes

Versions: 1

Compression:

Stored size: 410 Bytes

Contents

require "transformator/transformation/step"
require_relative "../doc_transformation"

class Skala::PrimoAdapter::Search::ResultTransformation::DocTransformation::
  SetIsPartOf < Transformator::Transformation::Step

  def call
    is_part_of = transformation.read_source_values(".//display/ispartof").map do |superorder|
      { label: superorder }
    end

    target.record.is_part_of = is_part_of
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
skala-1.1.0 lib/skala/primo_adapter/search/result_transformation/doc_transformation/set_is_part_of.rb