Class: Skala::PrimoAdapter::Search::RequestTransformation::AddSortByList
- Inherits:
-
Transformator::Transformation::Step
- Object
- Transformator::Transformation::Step
- Skala::PrimoAdapter::Search::RequestTransformation::AddSortByList
- Defined in:
- lib/skala/primo_adapter/search/request_transformation/add_sort_by_list.rb
Instance Method Summary collapse
-
#call ⇒ Object
SortField is optional, so we have to add it on the fly if necessary.
Instance Method Details
#call ⇒ Object
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 |