Class: Skala::PrimoAdapter::Search::RequestTransformation::AddSortByList

Inherits:
Transformator::Transformation::Step
  • Object
show all
Defined in:
lib/skala/primo_adapter/search/request_transformation/add_sort_by_list.rb

Instance Method Summary collapse

Instance Method Details

#callObject

SortField is optional, so we have to add it on the fly if necessary



10
11
12
13
14
15
# File 'lib/skala/primo_adapter/search/request_transformation/add_sort_by_list.rb', line 10

def call
  source.sort.try(:first).try do |_sort_request|
    primo_search_request = transformation.inner_search_request.locate("PrimoSearchRequest").first
    insert_sort_by_node(primo_search_request, _sort_request)
  end
end