Class: Skala::PrimoAdapter::Search::ResultTransformation::SortTermsFacetsTerms

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

Instance Method Summary collapse

Instance Method Details

#callObject



7
8
9
10
11
12
13
# File 'lib/skala/primo_adapter/search/result_transformation/sort_terms_facets_terms.rb', line 7

def call
  target.facets.each do |_target_facet|
    if _target_facet.type.to_s == "terms"
      _target_facet.terms.sort_by!(&:count).reverse!
    end
  end
end