Sha256: af7fb84cc9cb6888528fe9f79aa29e8cfac3e5b041ac5b3c342940c5092236bc

Contents?: true

Size: 350 Bytes

Versions: 5

Compression:

Stored size: 350 Bytes

Contents

require "celsius/transformation/step"
require "ox"

class Celsius::Primo::SoapApi::Searcher::SearchBrief::SearchResultTransformation::
  SetTotalHits < Celsius::Transformation::Step

  def call
    if docset = (search_brief_return.locate("JAGROOT/RESULT/DOCSET") || []).first
      target["hits"]["total"] = docset[:TOTALHITS].to_i
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
celsius-primo-0.1.4 lib/celsius/primo/soap_api/searcher/search_brief/search_result_transformation/set_total_hits.rb
celsius-primo-0.1.3 lib/celsius/primo/soap_api/searcher/search_brief/search_result_transformation/set_total_hits.rb
celsius-primo-0.1.2 lib/celsius/primo/soap_api/searcher/search_brief/search_result_transformation/set_total_hits.rb
celsius-primo-0.1.1 lib/celsius/primo/soap_api/searcher/search_brief/search_result_transformation/set_total_hits.rb
celsius-primo-0.1.0 lib/celsius/primo/soap_api/searcher/search_brief/search_result_transformation/set_total_hits.rb